]> Savannah Git Hosting - gnulib.git/commitdiff
isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2.
authorBruno Haible <bruno@clisp.org>
Wed, 14 Feb 2024 19:08:15 +0000 (20:08 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 14 Feb 2024 19:09:37 +0000 (20:09 +0100)
Reported by Paul E Reimer <reimer@anl.gov> in
<https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00002.html>.

* lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS
with clang ≥ 14.

ChangeLog
lib/math.in.h

index 2e3959591d8ae737ca5ab03005b8b906ad242cc9..f50b2d29a328433b9922fe3185d8d7d2c4d08407 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-02-14  Bruno Haible  <bruno@clisp.org>
+
+       isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2.
+       Reported by Paul E Reimer <reimer@anl.gov> in
+       <https://lists.gnu.org/archive/html/bug-gettext/2024-02/msg00002.html>.
+       * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS
+       with clang ≥ 14.
+
 2024-02-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        nstrftime: allow opt-out of AM/PM adjustment
index 718a2701644a80938cb9bf8dd00adc76e3d3afe8..85b7e6ff955525293d35644a657b9c421cde7250 100644 (file)
@@ -2668,7 +2668,7 @@ _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
 #    define isnan rpl_isnan
 #    define GNULIB_NAMESPACE_LACKS_ISNAN 1
-#   elif (defined __FreeBSD__ && __clang_major__ >= 14)
+#   elif (((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__) && __clang_major__ >= 14)
   /* Neither of the two possible _GL_MATH_CXX_REAL_FLOATING_DECL_2 invocations
      works.  Inline functions are already present in /usr/include/c++/v1/math.h,
      which comes from LLVM.  */