]> 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>
Sat, 16 Mar 2024 07:59:07 +0000 (08:59 +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 b3266e3d2cfde84fc4208d2a18522c9fb580d35c..c35253d903005eb1d459573d0eec7c2f9380bfff 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-12  Bruno Haible  <bruno@clisp.org>
 
        limits-h: Fix BOOL_MAX value.
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.  */