From 65f7068160bfc9a3f4b195a579c881188cc4fff3 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 20 Jun 2021 19:35:13 +0000 Subject: A Configure test for C11 thread local storage specificer, _Thread_local We also provbe for gcc's earlier syntax, __thread. --- config_h.SH | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'config_h.SH') diff --git a/config_h.SH b/config_h.SH index 82677a4a1c..9652cad49d 100755 --- a/config_h.SH +++ b/config_h.SH @@ -1073,6 +1073,18 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_static_inline HAS_STATIC_INLINE /**/ #define PERL_STATIC_INLINE $perl_static_inline /**/ +/* PERL_THREAD_LOCAL: + * This symbol, if defined, gives a linkage specification for thread-local + * storage. For example, for a C11 compiler this will be _Thread_local. + * Beware, some compilers are sensitive to the C language standard they are + * told to parse. For example, suncc defaults to C11, so our probe will + * report that _Thread_local can be used. However, if the -std=c99 is later + * added to the compiler flags, then _Thread_local will become a syntax + * error. Hence it is important for these flags to be consistent between + * probing and use. + */ +#$d_thread_local PERL_THREAD_LOCAL $perl_thread_local /**/ + /* USE_STDIO_PTR: * This symbol is defined if the _ptr and _cnt fields (or similar) * of the stdio FILE structure can be used to access the stdio buffer -- cgit v1.2.1