summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2017-06-01 21:10:38 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2017-06-01 21:10:38 +0000
commit756f50883aba4e9300f1ad7f6d4bd45126bcbe5e (patch)
treef56ffa9edcbe2acb2713e49a1bbfdc2f83159c22
parent2cd5ccdf8478207f435692b6630265bd209beb58 (diff)
downloadlibapr-756f50883aba4e9300f1ad7f6d4bd45126bcbe5e.tar.gz
Partially revert 1738806 (r1733775, r1738791 from trunk), preserve
apr_os_proc_mutex_get_ex|_put_ex, but fall back to the supported APR_LOCK_DEFAULT git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1797267 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES1
-rw-r--r--locks/beos/proc_mutex.c8
-rw-r--r--locks/netware/proc_mutex.c14
-rw-r--r--locks/os2/proc_mutex.c8
-rw-r--r--locks/win32/proc_mutex.c10
5 files changed, 24 insertions, 17 deletions
diff --git a/CHANGES b/CHANGES
index d6226f9e9..e350885f3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
-*- coding: utf-8 -*-
Changes for APR 1.6.2
+ *) Corrected non-Unix builds for APR_LOCK_DEFAULT. [William Rowe]
Changes for APR 1.6.1
diff --git a/locks/beos/proc_mutex.c b/locks/beos/proc_mutex.c
index e14d6ef10..f09da850a 100644
--- a/locks/beos/proc_mutex.c
+++ b/locks/beos/proc_mutex.c
@@ -132,7 +132,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
- return APR_LOCK_DEFAULT_TIMED;
+ return APR_LOCK_DEFAULT;
}
APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
@@ -158,7 +158,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
ospmutex->sem = pmutex->Lock;
ospmutex->ben = pmutex->LockCount;
if (mech) {
- *mech = APR_LOCK_DEFAULT_TIMED;
+ *mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
@@ -178,7 +178,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex,
if (pool == NULL) {
return APR_ENOPOOL;
}
- if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+ if (mech != APR_LOCK_DEFAULT) {
return APR_ENOTIMPL;
}
@@ -200,7 +200,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
- return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
+ return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}
diff --git a/locks/netware/proc_mutex.c b/locks/netware/proc_mutex.c
index 3322dfeeb..c36488828 100644
--- a/locks/netware/proc_mutex.c
+++ b/locks/netware/proc_mutex.c
@@ -27,9 +27,13 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
{
apr_status_t ret;
apr_proc_mutex_t *new_mutex = NULL;
+
+ if (mech != APR_LOCK_DEFAULT) {
+ return APR_ENOTIMPL;
+ }
+
new_mutex = (apr_proc_mutex_t *)apr_pcalloc(pool, sizeof(apr_proc_mutex_t));
-
- if(new_mutex ==NULL) {
+ if (new_mutex == NULL) {
return APR_ENOMEM;
}
@@ -123,10 +127,12 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
if (mech) {
*mech = APR_LOCK_DEFAULT;
}
- return APR_SUCCESS;
#else
- return APR_ENOTIMPL;
+ if (mech) {
+ *mech = APR_LOCK_DEFAULT;
+ }
#endif
+ return APR_SUCCESS;
}
APR_DECLARE(apr_status_t) apr_os_proc_mutex_get(apr_os_proc_mutex_t *ospmutex,
diff --git a/locks/os2/proc_mutex.c b/locks/os2/proc_mutex.c
index f0564325a..4640f69c6 100644
--- a/locks/os2/proc_mutex.c
+++ b/locks/os2/proc_mutex.c
@@ -62,7 +62,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
- return APR_LOCK_DEFAULT_TIMED;
+ return APR_LOCK_DEFAULT;
}
APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
@@ -218,7 +218,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
{
*ospmutex = pmutex->hMutex;
if (mech) {
- *mech = APR_LOCK_DEFAULT_TIMED;
+ return *mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
@@ -239,7 +239,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex,
if (pool == NULL) {
return APR_ENOPOOL;
}
- if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+ if (mech != APR_LOCK_DEFAULT) {
return APR_ENOTIMPL;
}
@@ -261,7 +261,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
- return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
+ return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}
diff --git a/locks/win32/proc_mutex.c b/locks/win32/proc_mutex.c
index db7d9e6e7..6baccca08 100644
--- a/locks/win32/proc_mutex.c
+++ b/locks/win32/proc_mutex.c
@@ -43,7 +43,7 @@ APR_DECLARE(apr_status_t) apr_proc_mutex_create(apr_proc_mutex_t **mutex,
HANDLE hMutex;
void *mutexkey;
- if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+ if (mech != APR_LOCK_DEFAULT) {
return APR_ENOTIMPL;
}
@@ -195,7 +195,7 @@ APR_DECLARE(const char *) apr_proc_mutex_lockfile(apr_proc_mutex_t *mutex)
APR_DECLARE(apr_lockmech_e) apr_proc_mutex_mech(apr_proc_mutex_t *mutex)
{
- return APR_LOCK_DEFAULT_TIMED;
+ return APR_LOCK_DEFAULT;
}
APR_DECLARE(const char *) apr_proc_mutex_name(apr_proc_mutex_t *mutex)
@@ -220,7 +220,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_get_ex(apr_os_proc_mutex_t *ospmutex
{
*ospmutex = pmutex->handle;
if (mech) {
- *mech = APR_LOCK_DEFAULT_TIMED;
+ *mech = APR_LOCK_DEFAULT;
}
return APR_SUCCESS;
}
@@ -240,7 +240,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put_ex(apr_proc_mutex_t **pmutex,
if (pool == NULL) {
return APR_ENOPOOL;
}
- if (mech != APR_LOCK_DEFAULT && mech != APR_LOCK_DEFAULT_TIMED) {
+ if (mech != APR_LOCK_DEFAULT) {
return APR_ENOTIMPL;
}
@@ -262,7 +262,7 @@ APR_DECLARE(apr_status_t) apr_os_proc_mutex_put(apr_proc_mutex_t **pmutex,
apr_os_proc_mutex_t *ospmutex,
apr_pool_t *pool)
{
- return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT_TIMED,
+ return apr_os_proc_mutex_put_ex(pmutex, ospmutex, APR_LOCK_DEFAULT,
0, pool);
}