# HG changeset patch # User Bruno Haible # Date 1518857743 -3600 # Node ID aa3cd60dc529a832319fdaa421b2f6ff1322badd # Parent 6828f5d6f32d362c6fd90909d08c9d689d96ed19 thread: Fix compilation error on IRIX. * lib/glthread/thread.h: Include . Include when needed; include it outside the C++ extern "C" {} block. * doc/posix-headers/pthread.texi: Mention the problem with pthread_atfork on IRIX. diff -r 6828f5d6f32d -r aa3cd60dc529 ChangeLog --- a/ChangeLog Sun Feb 04 11:00:38 2018 +0100 +++ b/ChangeLog Sat Feb 17 09:55:43 2018 +0100 @@ -1,3 +1,11 @@ +2018-02-17 Bruno Haible + + thread: Fix compilation error on IRIX. + * lib/glthread/thread.h: Include . Include when + needed; include it outside the C++ extern "C" {} block. + * doc/posix-headers/pthread.texi: Mention the problem with + pthread_atfork on IRIX. + 2018-02-04 Bruno Haible nl_langinfo: Override the system's nl_langinfo() when needed. diff -r 6828f5d6f32d -r aa3cd60dc529 doc/posix-headers/pthread.texi --- a/doc/posix-headers/pthread.texi Sun Feb 04 11:00:38 2018 +0100 +++ b/doc/posix-headers/pthread.texi Sat Feb 17 09:55:43 2018 +0100 @@ -21,4 +21,8 @@ not offer threads, so much as lightweight stubs that make conditional compilation easier for fallbacks to single-threaded programs. Minix 3.1.8, mingw 2.x, MSVC 14, BeOS. +@item +This header file lacks the declaration of @code{pthread_atfork} on some +platforms: +IRIX 6.5. @end itemize diff -r 6828f5d6f32d -r aa3cd60dc529 lib/glthread/thread.h --- a/lib/glthread/thread.h Sun Feb 04 11:00:38 2018 +0100 +++ b/lib/glthread/thread.h Sat Feb 17 09:55:43 2018 +0100 @@ -90,6 +90,17 @@ # include +/* On IRIX, pthread_atfork is declared in , not in . */ +# if defined __sgi +# include +# endif + +# if USE_POSIX_THREADS_WEAK +/* Compilers other than GCC need to see the declaration of pthread_sigmask + before the "#pragma weak pthread_sigmask" below. */ +# include +# endif + # ifdef __cplusplus extern "C" { # endif @@ -124,10 +135,6 @@ # pragma weak pthread_create -# ifdef __clang__ - /* Without this, clang complains that pthread_sigmask is never declared. */ -# include -# endif # ifndef pthread_sigmask /* Do not declare rpl_pthread_sigmask weak. */ # pragma weak pthread_sigmask # endif