This is a patch against the trunk that re-enables rwlock support in
APR on Mac OS X (Darwin). Apparently the PTHREAD_RWLOCK_INITIALIZER
is no longer part of the posix spec[1], and so it was completely removed from
the pthread.h header on darwin. Since APR doesn't ever do static initialization
of rwlock variables, this isn't a problem for us except that now our autoconf
detection is broken. I'm posting this instead of just committing it because
I want to make sure it's not going to screw anyone else up, and also because
I think it needs to be backported (which I'm volunteering to do after some +1s).


[1] http://www.opengroup.org/onlinepubs/009695399/basedefs/pthread.h.html

-aaron



Index: configure.in
===================================================================
--- configure.in (revision 148958)
+++ configure.in (working copy)
@@ -603,7 +603,7 @@
dnl ----------------------------- Checking for pthread_rwlock_t
AC_CACHE_CHECK([for pthread_rwlock_t], [apr_cv_type_rwlock_t],
AC_TRY_COMPILE([#include <sys/types.h>
-#include <pthread.h>], [pthread_rwlock_t rwlock=PTHREAD_RWLOCK_INITIALIZER;],
+#include <pthread.h>], [pthread_rwlock_t *rwlock;],
[apr_cv_type_rwlock_t=yes], [apr_cv_type_rwlock_t=no],
[apr_cv_type_rwlock_t=no]))
if test "$apr_cv_type_rwlock_t" = "yes"; then




Reply via email to