From 6002009b76cda002a103ffb39945ba74c4dc9c75 Mon Sep 17 00:00:00 2001 From: Bruno Haible <bruno@clisp.org> Date: Thu, 5 Dec 2019 09:50:01 +0100 Subject: [PATCH] Fix compilation errors in C++ mode with xlclang++ on AIX. * lib/pthread.in.h (pthread_exit): Add comment. * lib/threads.in.h (thrd_exit): Likewise. --- lib/pthread.in.h | 2 ++ lib/threads.in.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/pthread.in.h b/lib/pthread.in.h index c94638b7e4..a2c76e44fa 100644 --- a/lib/pthread.in.h +++ b/lib/pthread.in.h @@ -689,6 +689,8 @@ _GL_CXXALIAS_RPL (pthread_exit, _Noreturn void, (void *value)); # if !@HAVE_PTHREAD_EXIT@ _GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value)); # endif +/* Need to cast, because on AIX with xlclang++, the return type is + void. */ _GL_CXXALIAS_SYS_CAST (pthread_exit, _Noreturn void, (void *value)); # endif _GL_CXXALIASWARN (pthread_exit); diff --git a/lib/threads.in.h b/lib/threads.in.h index 39ccead948..1d28351efa 100644 --- a/lib/threads.in.h +++ b/lib/threads.in.h @@ -268,6 +268,8 @@ _GL_WARN_ON_USE (thrd_join, "thrd_join is unportable - " # if !@HAVE_THREADS_H@ _GL_FUNCDECL_SYS (thrd_exit, _Noreturn void, (int)); # endif +/* Need to cast, because on AIX with xlclang++, the return type is + void. */ _GL_CXXALIAS_SYS_CAST (thrd_exit, _Noreturn void, (int)); _GL_CXXALIASWARN (thrd_exit); #elif defined GNULIB_POSIXCHECK -- 2.39.5