Commit | Line | Data |
---|---|---|
c0c3707f | 1 | # serial 16 |
6ec2e0f5 | 2 | # Configure fcntl.h. |
5df4cba6 | 3 | dnl Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc. |
6ec2e0f5 SDJ |
4 | dnl This file is free software; the Free Software Foundation |
5 | dnl gives unlimited permission to copy and/or distribute it, | |
6 | dnl with or without modifications, as long as this notice is preserved. | |
7 | ||
8 | dnl Written by Paul Eggert. | |
9 | ||
10 | AC_DEFUN([gl_FCNTL_H], | |
11 | [ | |
12 | AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) | |
13 | AC_REQUIRE([gl_FCNTL_O_FLAGS]) | |
14 | gl_NEXT_HEADERS([fcntl.h]) | |
15 | ||
16 | dnl Ensure the type pid_t gets defined. | |
17 | AC_REQUIRE([AC_TYPE_PID_T]) | |
18 | ||
19 | dnl Ensure the type mode_t gets defined. | |
20 | AC_REQUIRE([AC_TYPE_MODE_T]) | |
21 | ||
22 | dnl Check for declarations of anything we want to poison if the | |
23 | dnl corresponding gnulib module is not in use, if it is not common | |
24 | dnl enough to be declared everywhere. | |
25 | gl_WARN_ON_USE_PREPARE([[#include <fcntl.h> | |
26 | ]], [fcntl openat]) | |
27 | ]) | |
28 | ||
29 | AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], | |
30 | [ | |
31 | dnl Use AC_REQUIRE here, so that the default settings are expanded once only. | |
32 | AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) | |
33 | gl_MODULE_INDICATOR_SET_VARIABLE([$1]) | |
34 | dnl Define it also as a C macro, for the benefit of the unit tests. | |
35 | gl_MODULE_INDICATOR_FOR_TESTS([$1]) | |
36 | ]) | |
37 | ||
38 | AC_DEFUN([gl_FCNTL_H_DEFAULTS], | |
39 | [ | |
c0c3707f | 40 | GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT]) |
6ec2e0f5 SDJ |
41 | GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) |
42 | GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) | |
43 | GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) | |
44 | GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) | |
45 | dnl Assume proper GNU behavior unless another module says otherwise. | |
46 | HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) | |
47 | HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) | |
c0c3707f | 48 | REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT]) |
6ec2e0f5 SDJ |
49 | REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) |
50 | REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) | |
51 | REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) | |
52 | ]) |