summaryrefslogtreecommitdiff
path: root/gnulib-m4/lock.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-m4/lock.m4')
-rw-r--r--gnulib-m4/lock.m411
1 files changed, 8 insertions, 3 deletions
diff --git a/gnulib-m4/lock.m4 b/gnulib-m4/lock.m4
index 1e83e236..cb04a67d 100644
--- a/gnulib-m4/lock.m4
+++ b/gnulib-m4/lock.m4
@@ -1,5 +1,5 @@
-# lock.m4 serial 13 (gettext-0.18.2)
-dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
+# lock.m4 serial 14
+dnl Copyright (C) 2005-2017 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 <pthread.h>])
+ 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(