From 2ef3298efe0d9d7706423e20450c2e854d75da52 Mon Sep 17 00:00:00 2001 From: trawick Date: Tue, 17 Nov 2009 14:28:12 +0000 Subject: 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 --- build/apr_hints.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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]) -- cgit v1.2.1