You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2022/03/09 07:35:01 UTC
svn commit: r1898771 - /httpd/httpd/trunk/include/httpd.h
Author: rpluem
Date: Wed Mar 9 07:35:01 2022
New Revision: 1898771
URL: http://svn.apache.org/viewvc?rev=1898771&view=rev
Log:
* 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
Modified:
httpd/httpd/trunk/include/httpd.h
Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1898771&r1=1898770&r2=1898771&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Wed Mar 9 07:35:01 2022
@@ -2587,7 +2587,9 @@ AP_DECLARE(void *) ap_realloc(void *ptr,
*/
#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