From: Yann Ylavic Date: Tue, 25 Jan 2022 16:41:48 +0000 (+0000) Subject: ap_regex: Follow up to r1897240: #if APR_HAS_THREAD_LOCAL, not #ifdef. X-Git-Tag: 2.5.0-alpha2-ci-test-only~540 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a6f105f7d4451f64b98cff16804a0158ddd29bff;p=thirdparty%2Fapache%2Fhttpd.git ap_regex: Follow up to r1897240: #if APR_HAS_THREAD_LOCAL, not #ifdef. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897459 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/main.c b/server/main.c index 9f9965598d2..85df0c6a3de 100644 --- a/server/main.c +++ b/server/main.c @@ -339,7 +339,7 @@ static void reset_process_pconf(process_rec *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 *argc, const char * const * *argv) 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 diff --git a/server/util_pcre.c b/server/util_pcre.c index 1af3e13d0c9..0e48448b673 100644 --- a/server/util_pcre.c +++ b/server/util_pcre.c @@ -318,7 +318,7 @@ void free_match_data(match_data_pt data, apr_size_t size) #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_size_t size, 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) {