]> Savannah Git Hosting - gnulib.git/commitdiff
math: Fix compilation error in C++ mode on AIX 7.2 with xlclang.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Sep 2022 16:03:02 +0000 (18:03 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2022 00:57:44 +0000 (02:57 +0200)
* 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.

ChangeLog
lib/math.in.h

index 564facbe53fc28eda1f7b13ea3966e6fd4f9ea7e..667d632e64c35445cc64940729b55eec16b99974 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-09-10  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        posix_spawn-internal: Don't lose flags while duplicating an fd.
index 270e71f41491799bd9eba0e36c845c83bf96f59e..0ef1ba10284099e8dfc2421842587e1a7ad2fa1b 100644 (file)
@@ -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