From 8e03578873a3cfda43eb4dbcac20c8fc6aed84f7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 28 Aug 2019 18:03:43 +0200 Subject: [PATCH] isfinite, isinf, isnan, signbit: Fix error in C++ mode on mingw. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported by Martin Storsjö in . * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. (isfinite, isinf, isnan, signbit): On platforms that use C++ include files from GCC 6 or newer, use an override through '#define', because the inline definitions in the platform's cannot be overridden in another way. --- ChangeLog | 7 ++++--- lib/math.in.h | 16 ++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6566b374f1..9119520717 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,9 +4,10 @@ Reported by Martin Storsjö in . * lib/math.in.h (_GL_MATH_CXX_REAL_FLOATING_DECL_2): Add more arguments. - (isfinite, isinf, isnan, signbit): On mingw, use an override through - '#define', because the inline definitions in the platform's - cannot be overridden in another way. + (isfinite, isinf, isnan, signbit): On platforms that use C++ include + files from GCC 6 or newer, use an override through '#define', because + the inline definitions in the platform's cannot be overridden + in another way. 2019-08-27 Paul Eggert diff --git a/lib/math.in.h b/lib/math.in.h index 8292650d73..538d3329d1 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -2207,8 +2207,8 @@ _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 defined __MINGW32__ - /* This platform's defines isfinite through a set of inline +# if __GNUC__ >= 6 || defined __clang__ + /* This platform's possibly defines isfinite through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite, rpl_isfinite, bool) # define isfinite rpl_isfinite @@ -2241,8 +2241,8 @@ _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 defined __MINGW32__ - /* This platform's defines isinf through a set of inline +# if __GNUC__ >= 6 || defined __clang__ + /* This platform's possibly defines isinf through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf, rpl_isinf, bool) # define isinf rpl_isinf @@ -2366,8 +2366,8 @@ _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 defined __MINGW32__ - /* This platform's defines isnan through a set of inline +# if __GNUC__ >= 6 || defined __clang__ + /* This platform's possibly defines isnan through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan, rpl_isnan, bool) # define isnan rpl_isnan @@ -2449,8 +2449,8 @@ _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 defined __MINGW32__ - /* This platform's defines signbit through a set of inline +# if __GNUC__ >= 6 || defined __clang__ + /* This platform's possibly defines signbit through a set of inline functions. */ _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit, rpl_signbit, bool) # define signbit rpl_signbit -- 2.39.5