From: Bruno Haible Date: Fri, 14 Apr 2023 22:46:57 +0000 (+0200) Subject: isnan: Fix compilation error in C++ mode on FreeBSD 13.2. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=575f9e440ae8a84c0d53ed6cbeed4e2b422e8d8e;p=gnulib.git isnan: Fix compilation error in C++ mode on FreeBSD 13.2. * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan through _GL_MATH_CXX_REAL_FLOATING_DECL_2. --- diff --git a/ChangeLog b/ChangeLog index 71b3e04a80..90b36854c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2023-04-14 Bruno Haible + + isnan: Fix compilation error in C++ mode on FreeBSD 13.2. + * lib/math.in.h (isnan): On FreeBSD 13.2 or newer, don't declare isnan + through _GL_MATH_CXX_REAL_FLOATING_DECL_2. + 2023-04-13 Bruno Haible ialloc, gethrxtime: Restore GCC diagnostics options. diff --git a/lib/math.in.h b/lib/math.in.h index 3d9465828e..235cb32121 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2623,6 +2623,11 @@ _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) + /* 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. */ +# define GNULIB_NAMESPACE_LACKS_ISNAN 1 # else _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, isnan, bool) # endif