summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-01-25 16:41:48 +0000
committerYann Ylavic <ylavic@apache.org>2022-01-25 16:41:48 +0000
commita6f105f7d4451f64b98cff16804a0158ddd29bff (patch)
tree6d24482329e34ebb940c6ad79847f9153d619b65
parent88ffb0ecd3f140ea991fd47d71d872e650bf9adc (diff)
downloadhttpd-a6f105f7d4451f64b98cff16804a0158ddd29bff.tar.gz
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
-rw-r--r--server/main.c4
-rw-r--r--server/util_pcre.c7
2 files changed, 5 insertions, 6 deletions
diff --git a/server/main.c b/server/main.c
index 9f9965598d..85df0c6a3d 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 1af3e13d0c..0e48448b67 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) {