From d4453c9768be819ded89ce4f7c894c77203999ff Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 14 Feb 2024 20:08:15 +0100 Subject: [PATCH] isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Paul E Reimer in . * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS with clang ≥ 14. --- ChangeLog | 8 ++++++++ lib/math.in.h | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 2e3959591d..f50b2d29a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024-02-14 Bruno Haible + + isnan: Fix compilation error in C++ mode on macOS 14.4 / Xcode 15.2. + Reported by Paul E Reimer in + . + * lib/math.in.h (GNULIB_NAMESPACE_LACKS_ISNAN): Define also on macOS + with clang ≥ 14. + 2024-02-13 Paul Eggert nstrftime: allow opt-out of AM/PM adjustment diff --git a/lib/math.in.h b/lib/math.in.h index 718a270164..85b7e6ff95 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -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. */ -- 2.39.5