aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
Diffstat (limited to 'math')
-rw-r--r--math/bits/mathcalls.h2
-rw-r--r--math/tgmath.h12
2 files changed, 12 insertions, 2 deletions
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index ee0c6d7219..da4cf4e10c 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -328,11 +328,13 @@ __MATHDECL (long long int,llround,, (_Mdouble_ __x));
/* Return positive difference between X and Y. */
__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
+# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X)
/* Return maximum numeric value from X and Y. */
__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
/* Return minimum numeric value from X and Y. */
__MATHCALLX (fmin,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
+# endif
/* Multiply-add function computed as a ternary operation. */
__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
diff --git a/math/tgmath.h b/math/tgmath.h
index 3d7b0998df..e8042833dd 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -892,12 +892,20 @@
/* Return positive difference between X and Y. */
#define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim)
+#if __GLIBC_USE (ISOC2X) && !defined __USE_GNU
/* Return maximum numeric value from X and Y. */
-#define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax)
+# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmax)
/* Return minimum numeric value from X and Y. */
-#define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
+# define fmin(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmin)
+#else
+/* Return maximum numeric value from X and Y. */
+# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmax)
+/* Return minimum numeric value from X and Y. */
+# define fmin(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmin)
+#endif
+
/* Multiply-add function computed as a ternary operation. */
#define fma(Val1, Val2, Val3) \