You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2009/11/17 15:28:12 UTC

svn commit: r881302 - /apr/apr/branches/1.4.x/build/apr_hints.m4

Author: trawick
Date: Tue Nov 17 14:28:12 2009
New Revision: 881302

URL: http://svn.apache.org/viewvc?rev=881302&view=rev
Log:
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.

Modified:
    apr/apr/branches/1.4.x/build/apr_hints.m4

Modified: apr/apr/branches/1.4.x/build/apr_hints.m4
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/build/apr_hints.m4?rev=881302&r1=881301&r2=881302&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/build/apr_hints.m4 (original)
+++ apr/apr/branches/1.4.x/build/apr_hints.m4 Tue Nov 17 14:28:12 2009
@@ -243,7 +243,11 @@
     *-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])