about summary refs log tree commit diff
path: root/math/complex.h
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>2018-06-18 21:11:26 -0300
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-02-20 17:11:06 -0600
commit77ad97356caacfa5a54236791c4f1f68b689e915 (patch)
treec3edb07460e4c7a79c0bc4ad76121c7d98cb2516 /math/complex.h
parentb790c8c2ed5d5a51026203ccb3c46a3e95526d6b (diff)
downloadglibc-77ad97356caacfa5a54236791c4f1f68b689e915.tar.gz
glibc-77ad97356caacfa5a54236791c4f1f68b689e915.tar.xz
glibc-77ad97356caacfa5a54236791c4f1f68b689e915.zip
Undefine redirections after long double definition on __LDBL_COMPAT [BZ #23294]
After defining the long double redirections to double, __MATHDECL_1 has
to be redefined to its previous state in order to avoid redirecting all
subsequent types.
Diffstat (limited to 'math/complex.h')
-rw-r--r--math/complex.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/math/complex.h b/math/complex.h
index d63005bec6..42f3fd7517 100644
--- a/math/complex.h
+++ b/math/complex.h
@@ -98,8 +98,10 @@ __BEGIN_DECLS
 #define __MATHDECL(type, function, args) \
   __MATHDECL_1(type, function, args); \
   __MATHDECL_1(type, __CONCAT(__,function), args)
-#define __MATHDECL_1(type, function, args) \
+#define __MATHDECL_1_IMPL(type, function, args) \
   extern type __MATH_PRECNAME(function) args __THROW
+#define __MATHDECL_1(type, function, args) \
+  __MATHDECL_1_IMPL(type, function, args)
 
 #define _Mdouble_ 		double
 #define __MATH_PRECNAME(name)	name
@@ -127,6 +129,11 @@ __BEGIN_DECLS
 # define _Mdouble_ 		long double
 # define __MATH_PRECNAME(name)	name##l
 # include <bits/cmathcalls.h>
+# if defined __LDBL_COMPAT
+#  undef __MATHDECL_1
+#  define __MATHDECL_1(type, function, args) \
+  __MATHDECL_1_IMPL(type, function, args)
+# endif
 #endif
 #undef	_Mdouble_
 #undef	__MATH_PRECNAME
@@ -215,6 +222,7 @@ __BEGIN_DECLS
 # undef _Mdouble_complex_
 #endif
 
+#undef	__MATHDECL_1_IMPL
 #undef	__MATHDECL_1
 #undef	__MATHDECL
 #undef	__MATHCALL