]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1898771 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Wed, 9 Mar 2022 14:04:15 +0000 (14:04 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 9 Mar 2022 14:04:15 +0000 (14:04 +0000)
* 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

Reviewed by: ylavic, covener, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898786 13f79535-47bb-0310-9956-ffa450edef68

STATUS
include/httpd.h

diff --git a/STATUS b/STATUS
index 7b75f7e59aad6c692e4cfbb3460c0cb54cbbdf1f..414e34b5878d59c95c4433e15b307023444e16ad 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -143,11 +143,6 @@ CURRENT RELEASE NOTES:
 
 RELEASE SHOWSTOPPERS:
 
-  *) Improve detection of _Thread_local
-     trunk patch: https://svn.apache.org/r1898771
-     2.4.x patch: svn merge -c 1898771 ^/httpd/httpd/trunk .
-     +1: ylavic, covener, rpluem
-
 
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
index f27bb2fb0e899b472fd6295aa7c60d3c8dc20563..799cf9705e940fdec3a5873786b3690233f4aaba 100644 (file)
@@ -2437,7 +2437,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