summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-06-21 04:35:41 +0200
committerBruno Haible <bruno@clisp.org>2019-06-21 11:17:47 +0200
commita12c7fd184e8a8251b1a3e9c0f681873995ec204 (patch)
tree7cdfc5f60e90dc73697bfc970e4dce7e62b850f6 /doc
parentb6293339816d7df16bb4d31d2ec1c1e5a79f976e (diff)
downloadgnulib-a12c7fd184e8a8251b1a3e9c0f681873995ec204.tar.gz
threads-h: Define 'thread_local' if and only it actually works.
* m4/threads.m4 (gl_THREAD_LOCAL_DEFINITION): New macro. (gl_THREADS_H): Define _Thread_local to __thread also for ARM C, IBM C, Oracle Solaris Studio C. Compile a simple program, to see whether _Thread_local basically works. Set HAVE_THREAD_LOCAL and LIBTHREADLOCAL. (gl_THREADS_H_DEFAULTS): Initialize HAVE_THREAD_LOCAL. * lib/threads.in.h (thread_local): Undefine if it does not work. * modules/threads-h (Makefile.am): Substitute HAVE_THREAD_LOCAL. (Link): Mention LIBTHREADLOCAL. * tests/test-threads.c: Don't check that thread_local is defined. * tests/test-thread_local.c: New file. * modules/threads-h-tests (Files): Add it and macros.h. (Depends-on): Add thrd and stdint. (configure.ac): Test whether 'alarm' is declared. (Makefile.am): Arrange to build and link test-thread_local. * doc/posix-headers/threads.texi: Mention the platforms that don't support 'thread_local'.
Diffstat (limited to 'doc')
-rw-r--r--doc/posix-headers/threads.texi14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/posix-headers/threads.texi b/doc/posix-headers/threads.texi
index 71ae43a48b..3c1c9fdc62 100644
--- a/doc/posix-headers/threads.texi
+++ b/doc/posix-headers/threads.texi
@@ -20,4 +20,18 @@ AIX 7.2.
Portability problems not fixed by Gnulib:
@itemize
+@item
+There is no way to define a working @code{thread_local} macro on some platforms:
+@itemize
+@item
+Mac OS X 10.5,
+@item
+OpenBSD 6.5,
+@item
+AIX 7.1 with gcc (but it works with @samp{xlc -qthreaded -qtls}),
+@item
+HP-UX 11.31 with cc (but it works with gcc),
+@item
+IRIX 6.5.
+@end itemize
@end itemize