From: Bruno Haible Date: Sat, 10 Sep 2022 16:03:02 +0000 (+0200) Subject: math: Fix compilation error in C++ mode on AIX 7.2 with xlclang. X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=d7c2a92db85bf459f2bedacb982a505332e78523;p=gnulib.git math: Fix compilation error in C++ mode on AIX 7.2 with xlclang. * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl, log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias warning only on glibc systems. --- diff --git a/ChangeLog b/ChangeLog index 564facbe53..667d632e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2022-09-10 Bruno Haible + + math: Fix compilation error in C++ mode on AIX 7.2 with xlclang. + * lib/math.in.h (cbrtl, copysignl, exp2l, expm1l, fmal, ilogbl, log1pl, + log2l, logbl, remainderl, rintl, roundl, truncl): Enable the C++ alias + warning only on glibc systems. + 2022-09-09 Bruno Haible posix_spawn-internal: Don't lose flags while duplicating an fd. diff --git a/lib/math.in.h b/lib/math.in.h index 270e71f414..0ef1ba1028 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -454,7 +454,9 @@ _GL_FUNCDECL_SYS (cbrtl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (cbrtl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (cbrtl); +# endif #elif defined GNULIB_POSIXCHECK # undef cbrtl # if HAVE_RAW_DECL_CBRTL @@ -567,7 +569,9 @@ _GL_WARN_ON_USE (copysign, "copysign is unportable - " _GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y)); +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (copysignl); +# endif #elif defined GNULIB_POSIXCHECK # undef copysignl # if HAVE_RAW_DECL_COPYSIGNL @@ -749,7 +753,9 @@ _GL_FUNCDECL_SYS (exp2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (exp2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (exp2l); +# endif #elif defined GNULIB_POSIXCHECK # undef exp2l # if HAVE_RAW_DECL_EXP2L @@ -824,7 +830,9 @@ _GL_FUNCDECL_SYS (expm1l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (expm1l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (expm1l); +# endif #elif defined GNULIB_POSIXCHECK # undef expm1l # if HAVE_RAW_DECL_EXPM1L @@ -1016,7 +1024,9 @@ _GL_FUNCDECL_SYS (fmal, long double, _GL_CXXALIAS_SYS (fmal, long double, (long double x, long double y, long double z)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (fmal); +# endif #elif defined GNULIB_POSIXCHECK # undef fmal # if HAVE_RAW_DECL_FMAL @@ -1337,7 +1347,9 @@ _GL_FUNCDECL_SYS (ilogbl, int, (long double x)); # endif _GL_CXXALIAS_SYS (ilogbl, int, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ilogbl); +# endif #elif defined GNULIB_POSIXCHECK # undef ilogbl # if HAVE_RAW_DECL_ILOGBL @@ -1652,7 +1664,9 @@ _GL_FUNCDECL_SYS (log1pl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log1pl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log1pl); +# endif #elif defined GNULIB_POSIXCHECK # undef log1pl # if HAVE_RAW_DECL_LOG1PL @@ -1726,7 +1740,9 @@ _GL_FUNCDECL_SYS (log2l, long double, (long double x)); # endif _GL_CXXALIAS_SYS (log2l, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (log2l); +# endif #elif defined GNULIB_POSIXCHECK # undef log2l # if HAVE_RAW_DECL_LOG2L @@ -1798,7 +1814,9 @@ _GL_FUNCDECL_SYS (logbl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (logbl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (logbl); +# endif #elif defined GNULIB_POSIXCHECK # undef logbl # if HAVE_RAW_DECL_LOGBL @@ -1964,7 +1982,9 @@ _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y)); # endif _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (remainderl); +# endif #elif defined GNULIB_POSIXCHECK # undef remainderl # if HAVE_RAW_DECL_REMAINDERL @@ -2018,7 +2038,9 @@ _GL_FUNCDECL_SYS (rintl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (rintl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (rintl); +# endif #elif defined GNULIB_POSIXCHECK # undef rintl # if HAVE_RAW_DECL_RINTL @@ -2093,7 +2115,9 @@ _GL_FUNCDECL_SYS (roundl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (roundl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (roundl); +# endif #elif defined GNULIB_POSIXCHECK # undef roundl # if HAVE_RAW_DECL_ROUNDL @@ -2350,7 +2374,9 @@ _GL_FUNCDECL_SYS (truncl, long double, (long double x)); # endif _GL_CXXALIAS_SYS (truncl, long double, (long double x)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (truncl); +# endif #elif defined GNULIB_POSIXCHECK # undef truncl # if HAVE_RAW_DECL_TRUNCL