From: Bruno Haible Date: Thu, 9 Feb 2023 18:27:37 +0000 (+0100) Subject: math: Fix compilation error in C++ mode on macOS 12.5. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=c0532d4bdf515a4dbb0fbb2fe634eac6fd609afd;p=gnulib.git math: Fix compilation error in C++ mode on macOS 12.5. * lib/math.in.h (isnan): On macOS, treat clang version 14 again like clang versions < 12. --- diff --git a/ChangeLog b/ChangeLog index 8126106a05..36feddfa7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-02-09 Bruno Haible + + math: Fix compilation error in C++ mode on macOS 12.5. + * lib/math.in.h (isnan): On macOS, treat clang version 14 again like + clang versions < 12. + 2023-02-09 Bruno Haible Fix compilation errors in C++ mode on macOS 12.5. diff --git a/lib/math.in.h b/lib/math.in.h index 0ef1ba1028..3d9465828e 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2002-2003, 2007-2022 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2007-2023 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -2617,7 +2617,7 @@ _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 __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ != 12) || (defined __FreeBSD__ && (__clang_major__ < 7 || __clang_major__ >= 11)) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isnan through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)