diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 21:27:12 (GMT) |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/lock.m4 | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/lock.m4')
-rw-r--r-- | gl/m4/lock.m4 | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4 index 9da8465..aae1701 100644 --- a/gl/m4/lock.m4 +++ b/gl/m4/lock.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # lock.m4 serial 10 (gettext-0.18) | 1 | # lock.m4 serial 13 (gettext-0.18.2) |
2 | dnl Copyright (C) 2005-2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -10,7 +10,7 @@ AC_DEFUN([gl_LOCK], | |||
10 | [ | 10 | [ |
11 | AC_REQUIRE([gl_THREADLIB]) | 11 | AC_REQUIRE([gl_THREADLIB]) |
12 | if test "$gl_threads_api" = posix; then | 12 | if test "$gl_threads_api" = posix; then |
13 | # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the | 13 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the |
14 | # pthread_rwlock_* functions. | 14 | # pthread_rwlock_* functions. |
15 | AC_CHECK_TYPE([pthread_rwlock_t], | 15 | AC_CHECK_TYPE([pthread_rwlock_t], |
16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], | 16 | [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], |
@@ -18,20 +18,25 @@ AC_DEFUN([gl_LOCK], | |||
18 | [], | 18 | [], |
19 | [#include <pthread.h>]) | 19 | [#include <pthread.h>]) |
20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. | 20 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. |
21 | AC_TRY_COMPILE([#include <pthread.h>], | 21 | AC_COMPILE_IFELSE([ |
22 | [#if __FreeBSD__ == 4 | 22 | AC_LANG_PROGRAM( |
23 | [[#include <pthread.h>]], | ||
24 | [[ | ||
25 | #if __FreeBSD__ == 4 | ||
23 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | 26 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." |
27 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ | ||
28 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) | ||
29 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." | ||
24 | #else | 30 | #else |
25 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | 31 | int x = (int)PTHREAD_MUTEX_RECURSIVE; |
26 | return !x; | 32 | return !x; |
27 | #endif], | 33 | #endif |
34 | ]])], | ||
28 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], | 35 | [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], |
29 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) | 36 | [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])]) |
30 | fi | 37 | fi |
31 | gl_PREREQ_LOCK | 38 | gl_PREREQ_LOCK |
32 | ]) | 39 | ]) |
33 | 40 | ||
34 | # Prerequisites of lib/lock.c. | 41 | # Prerequisites of lib/glthread/lock.c. |
35 | AC_DEFUN([gl_PREREQ_LOCK], [ | 42 | AC_DEFUN([gl_PREREQ_LOCK], [:]) |
36 | AC_REQUIRE([AC_C_INLINE]) | ||
37 | ]) | ||