X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Flock.m4;h=dac4c383f14ad38641c9ec8552993684bae46239;hb=ecea6a7078983379e5b4d8961337cc55298aa8b1;hp=aae1701a0a440a78f269059a5e81c7d1cb01b127;hpb=d738e90e8360e101b94fca8c79147f59565f62d8;p=debian%2Fgzip diff --git a/m4/lock.m4 b/m4/lock.m4 index aae1701..dac4c38 100644 --- a/m4/lock.m4 +++ b/m4/lock.m4 @@ -1,5 +1,5 @@ -# lock.m4 serial 13 (gettext-0.18.2) -dnl Copyright (C) 2005-2013 Free Software Foundation, Inc. +# lock.m4 serial 14 +dnl Copyright (C) 2005-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -12,11 +12,16 @@ AC_DEFUN([gl_LOCK], if test "$gl_threads_api" = posix; then # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. + has_rwlock=false AC_CHECK_TYPE([pthread_rwlock_t], - [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], + [has_rwlock=true + AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], [Define if the POSIX multithreading library has read/write locks.])], [], [#include ]) + if $has_rwlock; then + gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER + fi # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. AC_COMPILE_IFELSE([ AC_LANG_PROGRAM(