diff options
author | Ruediger Pluem <rpluem@apache.org> | 2022-03-09 08:35:01 +0100 |
---|---|---|
committer | Ruediger Pluem <rpluem@apache.org> | 2022-03-09 08:35:01 +0100 |
commit | 657313a25447075bcb23930c701370a3ae88a8b4 (patch) | |
tree | 03f4dea238f7bc468e7871f93f6cba75ca045cf5 /include | |
parent | * Improve the logic flow (diff) | |
download | apache2-657313a25447075bcb23930c701370a3ae88a8b4.tar.xz apache2-657313a25447075bcb23930c701370a3ae88a8b4.zip |
* Improve detection of _Thread_local
GCC < 4.9 reports __STDC_VERSION__ >= 201112 but does not implement
_Thread_local. Take care of this in the condition.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203066
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1898771 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/httpd.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/httpd.h b/include/httpd.h index dfd0304093..41e570799e 100644 --- a/include/httpd.h +++ b/include/httpd.h @@ -2587,7 +2587,9 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size) */ #if defined(__cplusplus) && __cplusplus >= 201103L #define AP_THREAD_LOCAL thread_local -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112 +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112 && \ + (!defined(__GNUC__) || \ + __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9)) #define AP_THREAD_LOCAL _Thread_local #elif defined(__GNUC__) /* works for clang too */ #define AP_THREAD_LOCAL __thread |