about summary refs log tree commit diff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/bits/mathcalls.h10
-rw-r--r--math/math.h6
-rw-r--r--math/tgmath.h2
3 files changed, 14 insertions, 4 deletions
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index a881b7d69c..7ffe0407e9 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -229,10 +229,12 @@ __END_NAMESPACE_C99
 /* Return nonzero if VALUE is not a number.  */
 __MATHDECL_1 (int,__isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
 
-#if defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
 /* Return nonzero if VALUE is not a number.  */
 __MATHDECL_1 (int,isnan,, (_Mdouble_ __value)) __attribute__ ((__const__));
+#endif
 
+#if defined __USE_MISC || defined __USE_XOPEN
 /* Bessel functions.  */
 __MATHCALL (j0,, (_Mdouble_));
 __MATHCALL (j1,, (_Mdouble_));
@@ -259,7 +261,7 @@ __MATHCALL (tgamma,, (_Mdouble_));
 __END_NAMESPACE_C99
 #endif
 
-#if defined __USE_MISC || defined __USE_XOPEN
+#if defined __USE_MISC || (defined __USE_XOPEN && !defined __USE_XOPEN2K)
 /* Obsolete alias for `lgamma'.  */
 __MATHCALL (gamma,, (_Mdouble_));
 #endif
@@ -366,7 +368,9 @@ __MATHDECL_1 (int, __issignaling,, (_Mdouble_ __value))
      __attribute__ ((__const__));
 #endif
 
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if defined __USE_MISC || (defined __USE_XOPEN_EXTENDED \
+			   && __MATH_DECLARING_DOUBLE	\
+			   && !defined __USE_XOPEN2K8)
 /* Return X times (2 to the Nth power).  */
 __MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
 #endif
diff --git a/math/math.h b/math/math.h
index c5115d7982..63511a68ec 100644
--- a/math/math.h
+++ b/math/math.h
@@ -77,6 +77,7 @@ __BEGIN_DECLS
 
 #define _Mdouble_		double
 #define __MATH_PRECNAME(name,r)	__CONCAT(name,r)
+#define __MATH_DECLARING_DOUBLE  1
 #define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
 #define _Mdouble_END_NAMESPACE   __END_NAMESPACE_STD
 #include <bits/mathcalls.h>
@@ -84,6 +85,7 @@ __BEGIN_DECLS
 #undef _Mdouble_BEGIN_NAMESPACE
 #undef _Mdouble_END_NAMESPACE
 #undef	__MATH_PRECNAME
+#undef __MATH_DECLARING_DOUBLE
 
 #ifdef __USE_ISOC99
 
@@ -96,6 +98,7 @@ __BEGIN_DECLS
 # endif
 # define _Mdouble_		_Mfloat_
 # define __MATH_PRECNAME(name,r) name##f##r
+# define __MATH_DECLARING_DOUBLE  0
 # define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
 # define _Mdouble_END_NAMESPACE   __END_NAMESPACE_C99
 # include <bits/mathcalls.h>
@@ -103,6 +106,7 @@ __BEGIN_DECLS
 # undef _Mdouble_BEGIN_NAMESPACE
 # undef _Mdouble_END_NAMESPACE
 # undef	__MATH_PRECNAME
+# undef __MATH_DECLARING_DOUBLE
 
 # if !(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
      || defined __LDBL_COMPAT \
@@ -140,6 +144,7 @@ extern long double __REDIRECT_NTH (nexttowardl,
 #  endif
 #  define _Mdouble_		_Mlong_double_
 #  define __MATH_PRECNAME(name,r) name##l##r
+#  define __MATH_DECLARING_DOUBLE  0
 #  define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
 #  define _Mdouble_END_NAMESPACE   __END_NAMESPACE_C99
 #  define __MATH_DECLARE_LDOUBLE   1
@@ -148,6 +153,7 @@ extern long double __REDIRECT_NTH (nexttowardl,
 #  undef _Mdouble_BEGIN_NAMESPACE
 #  undef _Mdouble_END_NAMESPACE
 #  undef __MATH_PRECNAME
+#  undef __MATH_DECLARING_DOUBLE
 
 # endif /* !(__NO_LONG_DOUBLE_MATH && _LIBC) || __LDBL_COMPAT */
 
diff --git a/math/tgmath.h b/math/tgmath.h
index 3e1fb0207a..610a42114a 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -401,7 +401,7 @@
 #define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder)
 
 /* Return X times (2 to the Nth power).  */
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#ifdef __USE_MISC
 # define scalb(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, scalb)
 #endif