From: Eric Covener Date: Mon, 26 Aug 2019 13:55:40 +0000 (+0000) Subject: no-op PROXY_THREAD_LOCK if !APR_HAS_THREADS X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8df3343a1576473687e4c9d240b87854a0634fe;p=apache no-op PROXY_THREAD_LOCK if !APR_HAS_THREADS ... 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 --- diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index e94f64c533..4b118a548a 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -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)