From: Bruno Haible Date: Wed, 19 Aug 2020 08:39:59 +0000 (+0200) Subject: Fix compilation errors in C++ mode on OpenBSD. X-Git-Tag: v1.0~3705 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=1f13f457403c5c8814d747f662267817b3c79954;p=gnulib.git Fix compilation errors in C++ mode on OpenBSD. * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on OpenBSD with clang, use the approach without C preprocessor macro. --- diff --git a/ChangeLog b/ChangeLog index cbd3803a3c..0b864f6a07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-19 Bruno Haible + + Fix compilation errors in C++ mode on OpenBSD. + * lib/math.in.h (isfinite, isinf, isnan, signbit): In C++ mode on + OpenBSD with clang, use the approach without C preprocessor macro. + 2020-08-18 Bruno Haible uchar C++ tests: Fix side effect on math modules (regr. 2020-08-17). diff --git a/lib/math.in.h b/lib/math.in.h index 0f67127b15..2fa79bbac2 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2336,7 +2336,7 @@ _GL_EXTERN_C int gl_isfinitel (long double x); # if defined isfinite || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite) # undef isfinite -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isfinite through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) @@ -2370,7 +2370,7 @@ _GL_EXTERN_C int gl_isinfl (long double x); # if defined isinf || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf) # undef isinf -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines isinf through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) @@ -2497,7 +2497,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__ || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || 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) @@ -2580,7 +2580,7 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined signbit || defined GNULIB_NAMESPACE _GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit) # undef signbit -# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) +# if __GNUC__ >= 6 || (defined __clang__ && !((defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __OpenBSD__ || defined _AIX || (defined _WIN32 && !defined __CYGWIN__))) /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool)