]> Savannah Git Hosting - gnulib.git/commitdiff
signbit: Fix compilation error with g++ 5.5 on Solaris 10.
authorBruno Haible <bruno@clisp.org>
Fri, 6 Dec 2024 19:48:06 +0000 (20:48 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 25 Dec 2024 14:30:44 +0000 (15:30 +0100)
Reported by G. Branden Robinson <g.branden.robinson@gmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00180.html>.

* lib/math.in.h (signbit): In C++ 11 or newer, assume that <math.h> or
<cmath> may define signbit through three inline functions.

ChangeLog
lib/math.in.h

index c1390e5a19aa44bc7629573134dabe0ebe4a8ff7..dd3d28a7572762499eed1f49678850ed528896c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-12-06  Bruno Haible  <bruno@clisp.org>
+
+       signbit: Fix compilation error with g++ 5.5 on Solaris 10.
+       Reported by G. Branden Robinson <g.branden.robinson@gmail.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2024-11/msg00180.html>.
+       * lib/math.in.h (signbit): In C++ 11 or newer, assume that <math.h> or
+       <cmath> may define signbit through three inline functions.
+
 2024-12-03  Bruno Haible  <bruno@clisp.org>
 
        strerror_r-posix: Silence gcc 14 warning.
index 8fadcc886f67fe85475b156f6227199336ccf79e..260e094552c2ba30ace7c70c5a8db3c70ae27bb9 100644 (file)
@@ -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 <cmath> possibly defines signbit through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)