+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.
# 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
# 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));
# 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
# 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
# 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)
# 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)
# 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
# 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