VirtualBox

source: kBuild/vendor/grep/2.12/m4/lock.m4@ 2595

Last change on this file since 2595 was 2595, checked in by bird, 12 years ago

gnu grep version 2.12 (grep-2.12.tar.xz, md5sum=8d2f0346d08b13c18afb81f0e8aa1e2f)

File size: 1.3 KB
Line 
1# lock.m4 serial 11 (gettext-0.18.2)
2dnl Copyright (C) 2005-2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_DEFUN([gl_LOCK],
10[
11 AC_REQUIRE([gl_THREADLIB])
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
14 # pthread_rwlock_* functions.
15 AC_CHECK_TYPE([pthread_rwlock_t],
16 [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
17 [Define if the POSIX multithreading library has read/write locks.])],
18 [],
19 [#include <pthread.h>])
20 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
21 AC_COMPILE_IFELSE([
22 AC_LANG_PROGRAM(
23 [[#include <pthread.h>]],
24 [[
25#if __FreeBSD__ == 4
26error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
27#else
28int x = (int)PTHREAD_MUTEX_RECURSIVE;
29return !x;
30#endif
31 ]])],
32 [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
33 [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
34 fi
35 gl_PREREQ_LOCK
36])
37
38# Prerequisites of lib/lock.c.
39AC_DEFUN([gl_PREREQ_LOCK], [
40 AC_REQUIRE([AC_C_INLINE])
41])
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette