You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2022/01/25 16:41:48 UTC

svn commit: r1897459 - in /httpd/httpd/trunk/server: main.c util_pcre.c

Author: ylavic
Date: Tue Jan 25 16:41:48 2022
New Revision: 1897459

URL: http://svn.apache.org/viewvc?rev=1897459&view=rev
Log:
ap_regex: Follow up to r1897240: #if APR_HAS_THREAD_LOCAL, not #ifdef.


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

Modified: httpd/httpd/trunk/server/main.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/main.c?rev=1897459&r1=1897458&r2=1897459&view=diff
==============================================================================
--- httpd/httpd/trunk/server/main.c (original)
+++ httpd/httpd/trunk/server/main.c Tue Jan 25 16:41:48 2022
@@ -339,7 +339,7 @@ static void reset_process_pconf(process_
     apr_pool_pre_cleanup_register(process->pconf, NULL, deregister_all_hooks);
 }
 
-#ifdef APR_HAS_THREAD_LOCAL
+#if APR_HAS_THREAD_LOCAL
 static apr_status_t main_thread_exit_cleanup(void *arg)
 {
     apr_thread_t *thd = arg;
@@ -399,7 +399,7 @@ static process_rec *init_process(int *ar
     process->argv = *argv;
     process->short_name = apr_filepath_name_get((*argv)[0]);
 
-#ifdef APR_HAS_THREAD_LOCAL
+#if APR_HAS_THREAD_LOCAL
     /* Create an apr_thread_t for the main thread to set up its
      * Thread Local Storage. Since it's detached and it won't
      * apr_thread_exit(), destroy its pool before exiting via

Modified: httpd/httpd/trunk/server/util_pcre.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_pcre.c?rev=1897459&r1=1897458&r2=1897459&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_pcre.c (original)
+++ httpd/httpd/trunk/server/util_pcre.c Tue Jan 25 16:41:48 2022
@@ -318,7 +318,7 @@ void free_match_data(match_data_pt data,
 #endif
 }
 
-#ifdef APR_HAS_THREAD_LOCAL
+#if APR_HAS_THREAD_LOCAL
 
 struct apreg_tls {
     match_data_pt data;
@@ -342,9 +342,8 @@ static match_data_pt get_match_data(apr_
     apr_thread_t *current;
     struct apreg_tls *tls = NULL;
 
-    /* Even though APR_HAS_THREAD_LOCAL is compiled in we may still be
-     * called by a native/non-apr thread, let's fall back to alloc/free
-     * in this case.
+    /* Even though APR_HAS_THREAD_LOCAL, we may still be called by a
+     * native/non-apr thread, let's fall back to alloc/free in this case.
      */
     current = apr_thread_current();
     if (!current) {