From: Bruno Haible Date: Fri, 12 Apr 2019 22:17:58 +0000 (+0200) Subject: signbit: Fix compilation error when gnulib's math.h exists twice. X-Git-Tag: v1.0~4985 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c2b2754fd365c27d488604edd42cacfff7d5d360;p=gnulib.git signbit: Fix compilation error when gnulib's math.h exists twice. * lib/math.in.h (GNULIB_defined_signbit): New macro. --- diff --git a/ChangeLog b/ChangeLog index 747fd2fcc2..641224193e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-04-12 Bruno Haible + + 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 openmp: Fix compilation error on platforms without OpenMP. 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