From: Bruno Haible Date: Fri, 6 Dec 2024 19:48:06 +0000 (+0100) Subject: signbit: Fix compilation error with g++ 5.5 on Solaris 10. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=0557d6543978a67d97274f83dff4370bd19110fd;p=gnulib.git signbit: Fix compilation error with g++ 5.5 on Solaris 10. Reported by G. Branden Robinson in . * lib/math.in.h (signbit): In C++ 11 or newer, assume that or may define signbit through three inline functions. --- diff --git a/ChangeLog b/ChangeLog index c1390e5a19..dd3d28a757 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-12-06 Bruno Haible + + signbit: Fix compilation error with g++ 5.5 on Solaris 10. + Reported by G. Branden Robinson in + . + * lib/math.in.h (signbit): In C++ 11 or newer, assume that or + may define signbit through three inline functions. + 2024-12-03 Bruno Haible strerror_r-posix: Silence gcc 14 warning. diff --git a/lib/math.in.h b/lib/math.in.h index 8fadcc886f..260e094552 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2745,7 +2745,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) +# if __cplusplus >= 201103L || __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)