You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by wr...@apache.org on 2017/06/01 21:10:38 UTC
svn commit: r1797267 - in /apr/apr/branches/1.6.x: CHANGES
locks/beos/proc_mutex.c locks/netware/proc_mutex.c locks/os2/proc_mutex.c
locks/win32/proc_mutex.c
Author: wrowe
Date: Thu Jun 1 21:10:38 2017
New Revision: 1797267
URL: http://svn.apache.org/viewvc?rev=1797267&view=rev
Log:
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
Modified:
apr/apr/branches/1.6.x/CHANGES
apr/apr/branches/1.6.x/locks/beos/proc_mutex.c
apr/apr/branches/1.6.x/locks/netware/proc_mutex.c
apr/apr/branches/1.6.x/locks/os2/proc_mutex.c
apr/apr/branches/1.6.x/locks/win32/proc_mutex.c
Modified: apr/apr/branches/1.6.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/CHANGES?rev=1797267&r1=1797266&r2=1797267&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.6.x/CHANGES [utf-8] Thu Jun 1 21:10:38 2017
@@ -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
Modified: apr/apr/branches/1.6.x/locks/beos/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/beos/proc_mutex.c?rev=1797267&r1=1797266&r2=1797267&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/beos/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/beos/proc_mutex.c Thu Jun 1 21:10:38 2017
@@ -132,7 +132,7 @@ APR_DECLARE(const char *) apr_proc_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_mu
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_mu
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_mu
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);
}
Modified: apr/apr/branches/1.6.x/locks/netware/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/netware/proc_mutex.c?rev=1797267&r1=1797266&r2=1797267&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/netware/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/netware/proc_mutex.c Thu Jun 1 21:10:38 2017
@@ -27,9 +27,13 @@ APR_DECLARE(apr_status_t) apr_proc_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_mu
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,
Modified: apr/apr/branches/1.6.x/locks/os2/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/os2/proc_mutex.c?rev=1797267&r1=1797266&r2=1797267&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/os2/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/os2/proc_mutex.c Thu Jun 1 21:10:38 2017
@@ -62,7 +62,7 @@ APR_DECLARE(const char *) apr_proc_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_mu
{
*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_mu
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_mu
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);
}
Modified: apr/apr/branches/1.6.x/locks/win32/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/win32/proc_mutex.c?rev=1797267&r1=1797266&r2=1797267&view=diff
==============================================================================
--- apr/apr/branches/1.6.x/locks/win32/proc_mutex.c (original)
+++ apr/apr/branches/1.6.x/locks/win32/proc_mutex.c Thu Jun 1 21:10:38 2017
@@ -43,7 +43,7 @@ APR_DECLARE(apr_status_t) apr_proc_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
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_mu
{
*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_mu
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_mu
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);
}
Re: svn commit: r1797267 - in /apr/apr/branches/1.6.x: CHANGES
locks/beos/proc_mutex.c locks/netware/proc_mutex.c locks/os2/proc_mutex.c locks/win32/proc_mutex.c
Posted by Yann Ylavic <yl...@gmail.com>.
On Thu, Jun 1, 2017 at 11:10 PM, <wr...@apache.org> wrote:
> Author: wrowe
> Date: Thu Jun 1 21:10:38 2017
> New Revision: 1797267
>
> URL: http://svn.apache.org/viewvc?rev=1797267&view=rev
> Log:
> 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
[]
>
> Modified: apr/apr/branches/1.6.x/locks/os2/proc_mutex.c
> URL: http://svn.apache.org/viewvc/apr/apr/branches/1.6.x/locks/os2/proc_mutex.c?rev=1797267&r1=1797266&r2=1797267&view=diff
> ==============================================================================
> --- apr/apr/branches/1.6.x/locks/os2/proc_mutex.c (original)
> +++ apr/apr/branches/1.6.x/locks/os2/proc_mutex.c Thu Jun 1 21:10:38 2017
> @@ -62,7 +62,7 @@ APR_DECLARE(const char *) apr_proc_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_mu
> {
> *ospmutex = pmutex->hMutex;
> if (mech) {
> - *mech = APR_LOCK_DEFAULT_TIMED;
> + return *mech = APR_LOCK_DEFAULT;
return?
> }
> return APR_SUCCESS;
> }