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 14:04:16 UTC

svn commit: r1898786 - in /httpd/httpd/branches/2.4.x: ./ STATUS include/httpd.h

Author: rpluem
Date: Wed Mar  9 14:04:15 2022
New Revision: 1898786

URL: http://svn.apache.org/viewvc?rev=1898786&view=rev
Log:
Merge r1898771 from trunk:

* 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

Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/STATUS
    httpd/httpd/branches/2.4.x/include/httpd.h

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1898771

Modified: httpd/httpd/branches/2.4.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/STATUS?rev=1898786&r1=1898785&r2=1898786&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/STATUS (original)
+++ httpd/httpd/branches/2.4.x/STATUS Wed Mar  9 14:04:15 2022
@@ -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. ]

Modified: httpd/httpd/branches/2.4.x/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/include/httpd.h?rev=1898786&r1=1898785&r2=1898786&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/include/httpd.h (original)
+++ httpd/httpd/branches/2.4.x/include/httpd.h Wed Mar  9 14:04:15 2022
@@ -2437,7 +2437,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