]> granicus.if.org Git - apache/commitdiff
no-op PROXY_THREAD_LOCK if !APR_HAS_THREADS
authorEric Covener <covener@apache.org>
Mon, 26 Aug 2019 13:55:40 +0000 (13:55 +0000)
committerEric Covener <covener@apache.org>
Mon, 26 Aug 2019 13:55:40 +0000 (13:55 +0000)
... instead of wrapping them in #if themselves in the C code.

r1852442 is a trunk-only change to make mod_proxy compile with !APR_HAS_THREADS.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1865936 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy.h

index e94f64c533e55a21d1017fa82cd4560f5fde878e..4b118a548a370f01227c3f41196f78a349bf7062 100644 (file)
@@ -556,8 +556,13 @@ struct proxy_balancer_method {
     apr_status_t (*updatelbstatus)(proxy_balancer *balancer, proxy_worker *elected, server_rec *s);
 };
 
+#if APR_HAS_THREADS
 #define PROXY_THREAD_LOCK(x)      ( (x) && (x)->tmutex ? apr_thread_mutex_lock((x)->tmutex) : APR_SUCCESS)
 #define PROXY_THREAD_UNLOCK(x)    ( (x) && (x)->tmutex ? apr_thread_mutex_unlock((x)->tmutex) : APR_SUCCESS)
+#else
+#define PROXY_THREAD_LOCK(x)      (APR_SUCCESS)
+#define PROXY_THREAD_UNLOCK(x)    (APR_SUCCESS)
+#endif
 
 #define PROXY_GLOBAL_LOCK(x)      ( (x) && (x)->gmutex ? apr_global_mutex_lock((x)->gmutex) : APR_SUCCESS)
 #define PROXY_GLOBAL_UNLOCK(x)    ( (x) && (x)->gmutex ? apr_global_mutex_unlock((x)->gmutex) : APR_SUCCESS)