cdefs.h: Move to more regular _Thread_local define

Move to trusting C++ environment for thread local storage designation.

Noticed by:		brooks
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D45663
This commit is contained in:
Warner Losh 2024-06-21 09:48:48 -06:00
parent 4a86b26b84
commit 5a969a3459

View file

@ -213,12 +213,7 @@
#endif
#if !__has_extension(c_thread_local)
/*
* XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
* without actually supporting the thread_local keyword. Don't check for
* the presence of C++11 when defining _Thread_local.
*/
#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
#if (defined(__cplusplus) && __cplusplus >= 201103L) ||
__has_extension(cxx_thread_local)
#define _Thread_local thread_local
#else