diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-17 14:28:12 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-17 14:28:12 +0000 |
commit | 2ef3298efe0d9d7706423e20450c2e854d75da52 (patch) | |
tree | 6805ec22939cbf63a60cee068044cb02de60ff20 | |
parent | 44d2d3867697433e637f8ca8017659ecc096c6a7 (diff) | |
download | libapr-2ef3298efe0d9d7706423e20450c2e854d75da52.tar.gz |
merge r881301 from trunk:
Solaris 10 or later: Use pthread by default for cross-process mutex instead of
fcntl; the latter is not thread-aware, leading to EDEADLK failures with some multi-
threaded, multi-process applications.
Proper recovery after a crash of the mutex owner was tested on Solaris 10 U5 and
OpenSolaris 2009.06. Earlier Solaris versions weren't tested, and there were
reports in httpd-land long ago about failures to recover the mutex.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@881302 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | build/apr_hints.m4 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index 680cbf4b6..e6a246611 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -243,7 +243,11 @@ dnl # Not a problem in 10.20. Otherwise, who knows? *-solaris2*) PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'` APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT]) - APR_SETIFNULL(apr_lock_method, [USE_FCNTL_SERIALIZE]) + if test $PLATOSVERS -ge 10; then + APR_SETIFNULL(apr_lock_method, [USE_PROC_PTHREAD_SERIALIZE]) + else + APR_SETIFNULL(apr_lock_method, [USE_FCNTL_SERIALIZE]) + fi # readdir64_r error handling seems broken on Solaris (at least # up till 2.8) -- it will return -1 at end-of-directory. APR_SETIFNULL(ac_cv_func_readdir64_r, [no]) |