Mailing List Archive

svn commit: r1902733 - in /httpd/httpd/trunk/server: util.c util_pcre.c
Author: ylavic
Date: Fri Jul 15 11:49:30 2022
New Revision: 1902733

URL: http://svn.apache.org/viewvc?rev=1902733&view=rev
Log:
util: Follow up to r1902728 and r1902731: static/AP_THREAD_LOCAL order matters.

gcc seems to want "static __thread" instead of "__thread static"..


Modified:
httpd/httpd/trunk/server/util.c
httpd/httpd/trunk/server/util_pcre.c

Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1902733&r1=1902732&r2=1902733&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Fri Jul 15 11:49:30 2022
@@ -3287,7 +3287,7 @@ AP_DECLARE(void *) ap_realloc(void *ptr,
#if APR_HAS_THREADS

#if AP_HAS_THREAD_LOCAL && !APR_VERSION_AT_LEAST(1,8,0)
-AP_THREAD_LOCAL static apr_thread_t *current_thread = NULL;
+static AP_THREAD_LOCAL apr_thread_t *current_thread = NULL;
#endif

struct thread_ctx {

Modified: httpd/httpd/trunk/server/util_pcre.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_pcre.c?rev=1902733&r1=1902732&r2=1902733&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_pcre.c (original)
+++ httpd/httpd/trunk/server/util_pcre.c Fri Jul 15 11:49:30 2022
@@ -301,7 +301,7 @@ struct match_thread_state {
apr_pool_t *pool;
};

-AP_THREAD_LOCAL static struct match_thread_state *thread_state;
+static AP_THREAD_LOCAL struct match_thread_state *thread_state;
#endif

struct match_data_state {