diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-02-02 11:02:26 +0100 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-02-02 11:02:26 +0100 |
commit | 7833dc9148c549040eee27ddc90dda8cf28dcf4d (patch) | |
tree | fa58a0e1c8a88d7639ba94c972eda4cbb792b288 /server/util_pcre.c | |
parent | main: Follow up to r1897240: Fix bad log copypasta. (diff) | |
download | apache2-7833dc9148c549040eee27ddc90dda8cf28dcf4d.tar.xz apache2-7833dc9148c549040eee27ddc90dda8cf28dcf4d.zip |
core: Follow up to r1897240: Opt-out for AP_HAS_THREAD_LOCAL and/or pcre's usage.
If the compiler's thread_local is not efficient enough on some platforms, or
not desired, have a way to disable its usage in httpd (at compile time).
Handle -DAP_NO_THREAD_LOCAL and/or -DAPREG_NO_THREAD_LOCAL as build opt-out for
thread_local usage in httpd gobally and/or in ap_regex only (respectively).
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897689 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_pcre.c')
-rw-r--r-- | server/util_pcre.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/util_pcre.c b/server/util_pcre.c index ff64e3ff17..2be99842c1 100644 --- a/server/util_pcre.c +++ b/server/util_pcre.c @@ -313,7 +313,7 @@ void free_match_data(match_data_pt data, apr_size_t size) #endif } -#if AP_HAS_THREAD_LOCAL +#if AP_HAS_THREAD_LOCAL && !defined(APREG_NO_THREAD_LOCAL) struct apreg_tls { match_data_pt data; @@ -380,7 +380,7 @@ static match_data_pt get_match_data(apr_size_t size, return tls->data; } -#else /* !AP_HAS_THREAD_LOCAL */ +#else /* AP_HAS_THREAD_LOCAL && !defined(APREG_NO_THREAD_LOCAL) */ static APR_INLINE match_data_pt get_match_data(apr_size_t size, match_vector_pt small_vector, @@ -390,7 +390,7 @@ static APR_INLINE match_data_pt get_match_data(apr_size_t size, return alloc_match_data(size, small_vector); } -#endif /* !AP_HAS_THREAD_LOCAL */ +#endif /* AP_HAS_THREAD_LOCAL && !defined(APREG_NO_THREAD_LOCAL) */ AP_DECLARE(int) ap_regexec(const ap_regex_t *preg, const char *string, apr_size_t nmatch, ap_regmatch_t *pmatch, |