]> Savannah Git Hosting - gnulib.git/commitdiff
signbit: Fix compilation error when gnulib's math.h exists twice.
authorBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2019 22:17:58 +0000 (00:17 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 12 Apr 2019 22:18:43 +0000 (00:18 +0200)
* lib/math.in.h (GNULIB_defined_signbit): New macro.

ChangeLog
lib/math.in.h

index 747fd2fcc2c9c6391bc258d84f3a92f05fbc76ae..641224193efd2ecf4c1f2024f44f358c48c1f7ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-12  Bruno Haible  <bruno@clisp.org>
+
+       signbit: Fix compilation error when gnulib's math.h exists twice.
+       * lib/math.in.h (GNULIB_defined_signbit): New macro.
+
 2019-04-12  Bruno Haible  <bruno@clisp.org>
 
        openmp: Fix compilation error on platforms without OpenMP.
index aa03ea3a0468c307db84b6b8aa81267fdd906eed..99a2c6a97984814a12f273c994eee48e376be26c 100644 (file)
@@ -2379,7 +2379,7 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
     sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
     __builtin_signbitf (x))
 # endif
-# if @REPLACE_SIGNBIT@
+# if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
 #  undef signbit
 _GL_EXTERN_C int gl_signbitf (float arg);
 _GL_EXTERN_C int gl_signbitd (double arg);
@@ -2422,6 +2422,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
    (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
     sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
     gl_signbitf (x))
+#  define GNULIB_defined_signbit 1
 # endif
 # ifdef __cplusplus
 #  if defined signbit || defined GNULIB_NAMESPACE