isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw.
authorBruno Haible <bruno@clisp.org>
Wed, 28 Aug 2019 16:03:43 +0000 (18:03 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 28 Aug 2019 16:03:43 +0000 (18:03 +0200)
Reported by Martin Storsjö <martin@martin.st> in
<https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.

* lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
(isfinite, isinf, isnan, signbit): On platforms that use C++ include
files from GCC 6 or newer, use an override through '#define', because
the inline definitions in the platform's <cmath> cannot be overridden
in another way.

ChangeLog
lib/math.in.h

index 6566b374f1723ee080f05d156b4e461aef6326e7..9119520717ee728e999f3bb871d6fd9714841b3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,9 +4,10 @@
        Reported by Martin Storsjö <martin@martin.st> in
        <https://lists.gnu.org/archive/html/bug-gnulib/2019-08/msg00075.html>.
        * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments.
-       (isfinite, isinf, isnan, signbit): On mingw, use an override through
-       '#define', because the inline definitions in the platform's <cmath>
-       cannot be overridden in another way.
+       (isfinite, isinf, isnan, signbit): On platforms that use C++ include
+       files from GCC 6 or newer, use an override through '#define', because
+       the inline definitions in the platform's <cmath> cannot be overridden
+       in another way.
 
 2019-08-27  Paul Eggert  <eggert@cs.ucla.edu>
 
index 8292650d732b69b6411c2f07674242518859641e..538d3329d18ea0dea6c46202d030d9e4c25809e0 100644 (file)
@@ -2207,8 +2207,8 @@ _GL_EXTERN_C int gl_isfinitel (long double x);
 #  if defined isfinite || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
 #   undef isfinite
-#   if defined __MINGW32__
-  /* This platform's <cmath> defines isfinite through a set of inline
+#   if __GNUC__ >= 6 || defined __clang__
+  /* This platform's <cmath> possibly defines isfinite through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
 #    define isfinite rpl_isfinite
@@ -2241,8 +2241,8 @@ _GL_EXTERN_C int gl_isinfl (long double x);
 #  if defined isinf || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
 #   undef isinf
-#   if defined __MINGW32__
-  /* This platform's <cmath> defines isinf through a set of inline
+#   if __GNUC__ >= 6 || defined __clang__
+  /* This platform's <cmath> possibly defines isinf through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
 #    define isinf rpl_isinf
@@ -2366,8 +2366,8 @@ _GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
 #  if defined isnan || defined GNULIB_NAMESPACE
 _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
 #   undef isnan
-#   if defined __MINGW32__
-  /* This platform's <cmath> defines isnan through a set of inline
+#   if __GNUC__ >= 6 || defined __clang__
+  /* This platform's <cmath> possibly defines isnan through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
 #    define isnan rpl_isnan
@@ -2449,8 +2449,8 @@ _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 defined __MINGW32__
-  /* This platform's <cmath> defines signbit through a set of inline
+#   if __GNUC__ >= 6 || defined __clang__
+  /* This platform's <cmath> possibly defines signbit through a set of inline
      functions.  */
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)
 #    define signbit rpl_signbit