summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaxim <maxim@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-20 07:57:37 +0000
committermaxim <maxim@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2009-11-20 07:57:37 +0000
commit13f9386e858d4de839bcf681debed84ea7f02974 (patch)
tree64a0cf05efa1d5adf62c234593c125a16bcb1cb6
parent204c2ee888323ba936900ae4067b950335245bf8 (diff)
2009-11-20 Jakub Jelinek <jakub@redhat.com>
PR libc/10103 * math/math.h: Provide *l long double prototypes redirecting to double functions even when __NO_LONG_DOUBLE_MATH and not __LDBL_COMPAT. * math/complex.h: Likewise. git-svn-id: svn://svn.eglibc.org/trunk@9305 7b3dc134-2b1b-0410-93df-9e9f96275f8d
-rw-r--r--libc/ChangeLog.eglibc9
-rw-r--r--libc/math/complex.h6
-rw-r--r--libc/math/math.h14
3 files changed, 22 insertions, 7 deletions
diff --git a/libc/ChangeLog.eglibc b/libc/ChangeLog.eglibc
index a19928bca..4d51eb4c6 100644
--- a/libc/ChangeLog.eglibc
+++ b/libc/ChangeLog.eglibc
@@ -1,3 +1,12 @@
+2009-11-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR libc/10103
+
+ * math/math.h: Provide *l long double prototypes redirecting
+ to double functions even when __NO_LONG_DOUBLE_MATH and not
+ __LDBL_COMPAT.
+ * math/complex.h: Likewise.
+
2009-11-19 Maxim Kuvyrkov <maxim@codesourcery.com>
* option-groups.def (OPTION_EGLIBC_LIBM_BIG): New option group.
diff --git a/libc/math/complex.h b/libc/math/complex.h
index 751aaf763..7e22fc9ab 100644
--- a/libc/math/complex.h
+++ b/libc/math/complex.h
@@ -85,8 +85,10 @@ __BEGIN_DECLS
/* And the long double versions. It is non-critical to define them
here unconditionally since `long double' is required in ISO C99. */
#if (__STDC__ - 0 || __GNUC__ - 0) \
- && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
-# ifdef __LDBL_COMPAT
+ && (!defined __NO_LONG_DOUBLE_MATH \
+ || defined __LDBL_COMPAT \
+ || !defined _LIBC)
+# if defined __LDBL_COMPAT || defined __NO_LONG_DOUBLE_MATH
# undef __MATHDECL_1
# define __MATHDECL_1(type, function, args) \
extern type __REDIRECT_NTH(__MATH_PRECNAME(function), args, function)
diff --git a/libc/math/math.h b/libc/math/math.h
index 4e65678b8..3abf7ae9a 100644
--- a/libc/math/math.h
+++ b/libc/math/math.h
@@ -98,7 +98,9 @@ __BEGIN_DECLS
# undef __MATH_PRECNAME
# if (__STDC__ - 0 || __GNUC__ - 0) \
- && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+ && (!defined __NO_LONG_DOUBLE_MATH \
+ || defined __LDBL_COMPAT \
+ || !defined _LIBC)
# ifdef __LDBL_COMPAT
# ifdef __USE_ISOC99
@@ -115,9 +117,9 @@ extern long double __REDIRECT_NTH (nexttowardl,
nextafter) __attribute__ ((__const__));
# endif
# endif
+# endif
-/* Include the file of declarations again, this time using `long double'
- instead of `double' and appending l to each function name. */
+# if defined __LDBL_COMPAT || defined __NO_LONG_DOUBLE_MATH
# undef __MATHDECL_1
# define __MATHDECL_2(type, function,suffix, args, alias) \
@@ -127,6 +129,8 @@ extern long double __REDIRECT_NTH (nexttowardl,
__MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
# endif
+/* Include the file of declarations again, this time using `long double'
+ instead of `double' and appending l to each function name. */
# ifndef _Mlong_double_
# define _Mlong_double_ long double
# endif
@@ -140,8 +144,8 @@ extern long double __REDIRECT_NTH (nexttowardl,
# define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
# include <bits/mathcalls.h>
# undef _Mdouble_
-# undef _Mdouble_BEGIN_NAMESPACE
-# undef _Mdouble_END_NAMESPACE
+# undef _Mdouble_BEGIN_NAMESPACE
+# undef _Mdouble_END_NAMESPACE
# undef __MATH_PRECNAME
# endif /* __STDC__ || __GNUC__ */