From: Daiki Ueno Date: Sat, 11 May 2013 01:40:55 +0000 (+0900) Subject: lock: work around pthread recursive mutexes bug in Mac OS X 10.6 X-Git-Tag: v0.1~141 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=3fe906e98202a591a6a14010aec1538adfd821b6;p=gnulib.git lock: work around pthread recursive mutexes bug in Mac OS X 10.6 * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the compilation target is Mac OS X 10.6. Problem reported by parafin and Andoni Morales in and . --- diff --git a/ChangeLog b/ChangeLog index 0a2b45786..94cc0d8b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-05-11 Daiki Ueno + + lock: work around pthread recursive mutexes bug in Mac OS X 10.6 + * m4/lock.m4: Don't define HAVE_PTHREAD_MUTEX_RECURSIVE if the + compilation target is Mac OS X 10.6. + Problem reported by parafin and Andoni Morales in + and + . + 2013-05-11 Paul Eggert mkdir-p: remove assumptions about umask and mode diff --git a/m4/lock.m4 b/m4/lock.m4 index d3fc1eff0..aae1701a0 100644 --- a/m4/lock.m4 +++ b/m4/lock.m4 @@ -24,6 +24,9 @@ AC_DEFUN([gl_LOCK], [[ #if __FreeBSD__ == 4 error "No, in FreeBSD 4.0 recursive mutexes actually don't work." +#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) +error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." #else int x = (int)PTHREAD_MUTEX_RECURSIVE; return !x;