You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2022/01/25 17:55:17 UTC
svn commit: r1897462 - in /httpd/httpd/trunk: include/httpd.h server/util.c
Author: ylavic
Date: Tue Jan 25 17:55:16 2022
New Revision: 1897462
URL: http://svn.apache.org/viewvc?rev=1897462&view=rev
Log:
Follow up to r1897460: !APR_HAS_THREAD implies no ap_thread_* either.
Modified:
httpd/httpd/trunk/include/httpd.h
httpd/httpd/trunk/server/util.c
Modified: httpd/httpd/trunk/include/httpd.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/httpd.h?rev=1897462&r1=1897461&r2=1897462&view=diff
==============================================================================
--- httpd/httpd/trunk/include/httpd.h (original)
+++ httpd/httpd/trunk/include/httpd.h Tue Jan 25 17:55:16 2022
@@ -2564,6 +2564,8 @@ AP_DECLARE(void *) ap_realloc(void *ptr,
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,
#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,
#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_cur
#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
Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1897462&r1=1897461&r2=1897462&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Tue Jan 25 17:55:16 2022
@@ -3261,7 +3261,7 @@ AP_DECLARE(void *) ap_realloc(void *ptr,
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 {