]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Follow up to r1897460: !APR_HAS_THREAD implies no ap_thread_* either.
authorYann Ylavic <ylavic@apache.org>
Tue, 25 Jan 2022 17:55:16 +0000 (17:55 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 25 Jan 2022 17:55:16 +0000 (17:55 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897462 13f79535-47bb-0310-9956-ffa450edef68

include/httpd.h
server/util.c

index 60e8948b872fc05dc26e07590c660c362da5ff8a..103e04921bdedfca012085cd6468b8542064db5b 100644 (file)
@@ -2564,6 +2564,8 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
                    AP_FN_ATTR_WARN_UNUSED_RESULT
                    AP_FN_ATTR_ALLOC_SIZE(2);
 
+#if APR_HAS_THREADS
+
 #if APR_VERSION_AT_LEAST(1,8,0)
 
 /**
@@ -2579,9 +2581,8 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
 #define ap_thread_current           apr_thread_current
 #define ap_thread_current_create    apr_thread_current_create
 
-#else /* !APR_VERSION_AT_LEAST(1,8,0) */
+#else  /* !APR_VERSION_AT_LEAST(1,8,0) */
 
-#if APR_HAS_THREADS
 /**
  * AP_THREAD_LOCAL keyword mapping the compiler's.
  */
@@ -2594,7 +2595,6 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
 #elif defined(WIN32) && defined(_MSC_VER)
 #define AP_THREAD_LOCAL __declspec(thread)
 #endif
-#endif /* APR_HAS_THREADS */
 
 #ifndef AP_THREAD_LOCAL
 #define AP_HAS_THREAD_LOCAL 0
@@ -2613,6 +2613,12 @@ AP_DECLARE(apr_thread_t *) ap_thread_current(void);
 
 #endif /* !APR_VERSION_AT_LEAST(1,8,0) */
 
+#else  /* !APR_HAS_THREADS */
+
+#define AP_HAS_THREAD_LOCAL 0
+
+#endif /* !APR_HAS_THREADS */
+
 /**
  * Get server load params
  * @param ld struct to populate: -1 in fields means error
index 39bde9c98e489689060f2f0242a792edc6a15362..6889ea9a3f1e863280e375a6930072c49b56ac00 100644 (file)
@@ -3261,7 +3261,7 @@ AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
     return p;
 }
 
-#if !APR_VERSION_AT_LEAST(1,8,0)
+#if APR_HAS_THREADS && !APR_VERSION_AT_LEAST(1,8,0)
 
 #if AP_HAS_THREAD_LOCAL
 struct thread_ctx {