From a147541558c0ddabbf8bc7277014d7f05196d084 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 6 Dec 2024 20:48:06 +0100 Subject: [PATCH] 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. --- ChangeLog | 8 ++++++++ lib/math.in.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 80aaebc3a1..e562c702db 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 834bbea38c..44b9af9831 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) -- 2.39.5