diff options
author | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2001-07-01 05:49:44 +0000 |
---|---|---|
committer | jerenkrantz <jerenkrantz@13f79535-47bb-0310-9956-ffa450edef68> | 2001-07-01 05:49:44 +0000 |
commit | 86ea685ca4b4224590186e9e705623218a41ff3a (patch) | |
tree | 184243a8fe7fa3514b25d0520d0eb13130ac96f5 | |
parent | 40452f7ed40bf589f64125ab0d2a438ee080ea8f (diff) | |
download | libapr-86ea685ca4b4224590186e9e705623218a41ff3a.tar.gz |
Cleanup the detection of pthread_rwlock_t. Let autoconf play with
the variables and set the APR_HAS_RWLOCK_SERIALIZE in apr.h rather
than in arch/unix/locks.h to be consistent with the rest of the
lock types.
Also, add struct to the types "known" by APR_IFALLYES.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61836 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | build/apr_common.m4 | 1 | ||||
-rw-r--r-- | configure.in | 2 | ||||
-rw-r--r-- | include/apr.h.in | 1 | ||||
-rw-r--r-- | include/arch/unix/locks.h | 6 |
4 files changed, 5 insertions, 5 deletions
diff --git a/build/apr_common.m4 b/build/apr_common.m4 index f17b4ed40..017af4641 100644 --- a/build/apr_common.m4 +++ b/build/apr_common.m4 @@ -239,6 +239,7 @@ for ac_spec in $1; do ac_var="ac_cv_file_$ac_item" ;; func ) ac_var="ac_cv_func_$ac_item" ;; + struct ) ac_var="ac_cv_struct_$ac_item" ;; define ) ac_var="ac_cv_define_$ac_item" ;; custom ) ac_var="$ac_item" ;; esac diff --git a/configure.in b/configure.in index df0fc996b..e8d579c88 100644 --- a/configure.in +++ b/configure.in @@ -969,6 +969,7 @@ APR_IFALLYES(func:semget func:semctl, hassysvser="1", hassysvser="0") APR_IFALLYES(func:flock define:LOCK_EX, hasflockser="1", hasflockser="0") APR_IFALLYES(header:fcntl.h define:F_SETLK, hasfcntlser="1", hasfcntlser="0") APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, hasprocpthreadser="1", hasprocpthreadser="0") +APR_IFALLYES(struct:pthread_rw, hasrwlockser="1", hasrwlockser="0") # See which lock mechanism we'll select by default on this system. # The last APR_DECIDE to execute sets the default @@ -1025,6 +1026,7 @@ AC_SUBST(hasflockser) AC_SUBST(hassysvser) AC_SUBST(hasfcntlser) AC_SUBST(hasprocpthreadser) +AC_SUBST(hasrwlockser) AC_SUBST(flockser) AC_SUBST(sysvser) AC_SUBST(fcntlser) diff --git a/include/apr.h.in b/include/apr.h.in index c420e2aec..ecea32d5a 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -68,6 +68,7 @@ #define APR_HAS_SYSVSEM_SERIALIZE @hassysvser@ #define APR_HAS_FCNTL_SERIALIZE @hasfcntlser@ #define APR_HAS_PROC_PTHREAD_SERIALIZE @hasprocpthreadser@ +#define APR_HAS_RWLOCK_SERIALIZE @hasrwlockser@ #define APR_HAS_LOCK_CREATE_NP @lockcreatenp@ diff --git a/include/arch/unix/locks.h b/include/arch/unix/locks.h index 0005fd7c0..a1f920d39 100644 --- a/include/arch/unix/locks.h +++ b/include/arch/unix/locks.h @@ -127,12 +127,8 @@ extern const apr_unix_lock_methods_t apr_unix_flock_methods; #if APR_HAS_PROC_PTHREAD_SERIALIZE extern const apr_unix_lock_methods_t apr_unix_proc_pthread_methods; #endif - -#if defined(HAVE_PTHREAD_RWLOCK_INIT) -#define APR_HAS_RWLOCK_SERIALIZE 1 +#if APR_HAS_RWLOCK_SERIALIZE extern const apr_unix_lock_methods_t apr_unix_rwlock_methods; -#else -#define APR_HAS_RWLOCK_SERIALIZE 0 #endif #if !APR_HAVE_UNION_SEMUN && defined(APR_HAS_SYSVSEM_SERIALIZE) |