summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-04-13 00:17:58 +0200
committerBruno Haible <bruno@clisp.org>2019-04-13 00:18:43 +0200
commitc2b2754fd365c27d488604edd42cacfff7d5d360 (patch)
treece28def5627571b732c663a59d8ddb34d802eea3 /lib
parentba61bd3ba2d450a2c23d52e623a27cd94450cb94 (diff)
downloadgnulib-c2b2754fd365c27d488604edd42cacfff7d5d360.tar.gz
signbit: Fix compilation error when gnulib's math.h exists twice.
* lib/math.in.h (GNULIB_defined_signbit): New macro.
Diffstat (limited to 'lib')
-rw-r--r--lib/math.in.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/math.in.h b/lib/math.in.h
index aa03ea3a04..99a2c6a979 100644
--- a/lib/math.in.h
+++ b/lib/math.in.h
@@ -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