]> Savannah Git Hosting - gnulib.git/commitdiff
Fix compilation errors in C++ mode with xlclang++ on AIX.
authorBruno Haible <bruno@clisp.org>
Thu, 5 Dec 2019 02:18:42 +0000 (03:18 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 5 Dec 2019 02:19:24 +0000 (03:19 +0100)
* lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
C++ mode on AIX.
(isfinite, signbit): In C++ mode on AIX with clang, use the approach
without C preprocessor macro.
* lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
_GL_CXXALIAS_SYS.
* lib/threads.in.h (thrd_exit): Likewise.

ChangeLog
lib/math.in.h
lib/pthread.in.h
lib/threads.in.h

index c5d8df6c134887b31f3163ce6402443e357a6ef6..cb3ffc7e83f9c828f800906fc86a4d13501f1d9f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2019-12-04  Bruno Haible  <bruno@clisp.org>
+
+       Fix compilation errors in C++ mode with xlclang++ on AIX.
+       * lib/math.in.h (expm1l, fmal, remainderl, roundl): Don't redeclare in
+       C++ mode on AIX.
+       (isfinite, signbit): In C++ mode on AIX with clang, use the approach
+       without C preprocessor macro.
+       * lib/pthread.in.h (pthread_exit): Use _GL_CXXALIAS_SYS_CAST instead of
+       _GL_CXXALIAS_SYS.
+       * lib/threads.in.h (thrd_exit): Likewise.
+
 2019-12-04  Bruno Haible  <bruno@clisp.org>
 
        Fix compilation error in C++ mode on Solaris 11 OpenIndiana.
index 3aa7f4e970671266d60f18c935b21cdfc3d09e96..3bb9663027767953709c4c230e5be250144e73a1 100644 (file)
@@ -780,7 +780,9 @@ _GL_CXXALIAS_RPL (expm1l, long double, (long double x));
 # else
 #  if !@HAVE_DECL_EXPM1L@
 #   undef expm1l
+#   if !(defined __cplusplus && defined _AIX)
 _GL_FUNCDECL_SYS (expm1l, long double, (long double x));
+#   endif
 #  endif
 _GL_CXXALIAS_SYS (expm1l, long double, (long double x));
 # endif
@@ -960,8 +962,10 @@ _GL_CXXALIAS_RPL (fmal, long double,
 # else
 #  if !@HAVE_FMAL@
 #   undef fmal
+#   if !(defined __cplusplus && defined _AIX)
 _GL_FUNCDECL_SYS (fmal, long double,
                   (long double x, long double y, long double z));
+#   endif
 #  endif
 _GL_CXXALIAS_SYS (fmal, long double,
                   (long double x, long double y, long double z));
@@ -1838,7 +1842,9 @@ _GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
 # else
 #  if !@HAVE_DECL_REMAINDERL@
 #   undef remainderl
+#   if !(defined __cplusplus && defined _AIX)
 _GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
+#   endif
 #  endif
 _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
 # endif
@@ -1965,7 +1971,9 @@ _GL_CXXALIAS_RPL (roundl, long double, (long double x));
 # else
 #  if !@HAVE_DECL_ROUNDL@
 #   undef roundl
+#   if !(defined __cplusplus && defined _AIX)
 _GL_FUNCDECL_SYS (roundl, long double, (long double x));
+#   endif
 #  endif
 _GL_CXXALIAS_SYS (roundl, long double, (long double x));
 # endif
@@ -2249,7 +2257,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__
+#   if __GNUC__ >= 6 || (defined __clang__ && !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)
@@ -2491,7 +2499,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__
+#   if __GNUC__ >= 6 || (defined __clang__ && !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)
index e564140898923db2076d8c5e3d970dfbf515fe1d..c94638b7e417b7cf3f206142283b76b4a64443a8 100644 (file)
@@ -689,7 +689,7 @@ _GL_CXXALIAS_RPL (pthread_exit, _Noreturn void, (void *value));
 #  if !@HAVE_PTHREAD_EXIT@
 _GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value));
 #  endif
-_GL_CXXALIAS_SYS (pthread_exit, _Noreturn void, (void *value));
+_GL_CXXALIAS_SYS_CAST (pthread_exit, _Noreturn void, (void *value));
 # endif
 _GL_CXXALIASWARN (pthread_exit);
 #elif defined GNULIB_POSIXCHECK
index 0ed87b337496036105b9b2155f522a1600e43d2f..39ccead948f6e41c5016ec126cad4b58ced099c8 100644 (file)
@@ -268,7 +268,7 @@ _GL_WARN_ON_USE (thrd_join, "thrd_join is unportable - "
 # if !@HAVE_THREADS_H@
 _GL_FUNCDECL_SYS (thrd_exit, _Noreturn void, (int));
 # endif
-_GL_CXXALIAS_SYS (thrd_exit, _Noreturn void, (int));
+_GL_CXXALIAS_SYS_CAST (thrd_exit, _Noreturn void, (int));
 _GL_CXXALIASWARN (thrd_exit);
 #elif defined GNULIB_POSIXCHECK
 # undef thrd_exit