From cfe9452d1dd3cf16e6c518b970bcdca70e8c872c Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 20 Mar 2021 22:34:16 +0100 Subject: [PATCH] math C++ tests: Fix compilation error on macOS 11.2. * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan', not 'isnan'. --- ChangeLog | 6 ++++++ lib/math.in.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 00b35b205d..8f7cf25162 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-03-20 Bruno Haible + + math C++ tests: Fix compilation error on macOS 11.2. + * lib/math.in.h (isnan): For clang >= 12 on macOS, declare 'rpl_isnan', + not 'isnan'. + 2021-03-18 Bruno Haible simple-atomic tests: Fix compilation error on Solaris 10. diff --git a/lib/math.in.h b/lib/math.in.h index 335505da61..bbe86ad1cf 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2579,7 +2579,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__) || (defined __FreeBSD__ && __clang_major__ < 7) || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__ && __clang_major__ < 12) || (defined __FreeBSD__ && __clang_major__ < 7) || 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) -- 2.39.5