summaryrefslogtreecommitdiffstats
path: root/server/util_pcre.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-01-20 12:24:59 +0100
committerYann Ylavic <ylavic@apache.org>2022-01-20 12:24:59 +0100
commitd3941e5eb6877d467ec1bfa08026ac92a3135327 (patch)
tree36e6a9093d90a0377bd31bc4bc18f2027ccaf7a5 /server/util_pcre.c
parentap_regex: Use Thread Local Storage (if efficient) to avoid allocations. (diff)
downloadapache2-d3941e5eb6877d467ec1bfa08026ac92a3135327.tar.xz
apache2-d3941e5eb6877d467ec1bfa08026ac92a3135327.zip
Follow up to r1897240: APR_HAS_THREAD_LOCAL wants #ifdef instead of #if.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897241 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_pcre.c')
-rw-r--r--server/util_pcre.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/util_pcre.c b/server/util_pcre.c
index fd987771fc..1dcd950792 100644
--- a/server/util_pcre.c
+++ b/server/util_pcre.c
@@ -282,7 +282,7 @@ typedef int* match_data_pt;
typedef int* match_vector_pt;
#endif
-#if APR_HAS_THREAD_LOCAL
+#ifdef APR_HAS_THREAD_LOCAL
static match_data_pt get_match_data(apr_size_t size,
match_vector_pt *ovector,
@@ -398,7 +398,7 @@ AP_DECLARE(int) ap_regexec_len(const ap_regex_t *preg, const char *buff,
match_vector_pt ovector = NULL;
apr_size_t nlim = ((apr_size_t)preg->re_nsub + 1) > nmatch
? ((apr_size_t)preg->re_nsub + 1) : nmatch;
-#if defined(HAVE_PCRE2) || APR_HAS_THREAD_LOCAL
+#if defined(HAVE_PCRE2) || defined(APR_HAS_THREAD_LOCAL)
match_data_pt data = get_match_data(nlim, &ovector, NULL);
#else
int small_vector[POSIX_MALLOC_THRESHOLD * 3];