+2019-12-08 Bruno Haible <bruno@clisp.org>
+
+ Fix compilation errors in C++ mode on macOS and FreeBSD.
+ * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on macOS
+ or FreeBSD with clang, use the approach without C preprocessor macro.
+
2019-12-07 Bruno Haible <bruno@clisp.org>
Fix compilation errors in C++ mode on AIX with xlclang++.
# if defined isfinite || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
# undef isfinite
-# if __GNUC__ >= 6 || (defined __clang__ && !defined _AIX)
+# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
/* This platform's <cmath> possibly defines isfinite through a set of inline
functions. */
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool)
# if defined isinf || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
# undef isinf
-# if __GNUC__ >= 6 || defined __clang__
+# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
/* This platform's <cmath> possibly defines isinf through a set of inline
functions. */
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool)
# if defined isnan || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
# undef isnan
-# if __GNUC__ >= 6 || defined __clang__
+# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__))
/* This platform's <cmath> possibly defines isnan through a set of inline
functions. */
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool)
# if defined signbit || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
# undef signbit
-# if __GNUC__ >= 6 || (defined __clang__ && !defined _AIX)
+# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX))
/* This platform's <cmath> possibly defines signbit through a set of inline
functions. */
_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)