gnulib: update to 776af40e0
[deliverable/binutils-gdb.git] / gnulib / import / m4 / fcntl_h.m4
CommitLineData
9c9d63b1 1# serial 17
6ec2e0f5 2# Configure fcntl.h.
9c9d63b1 3dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
6ec2e0f5
SDJ
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl Written by Paul Eggert.
9
10AC_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
29AC_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
38AC_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])
9c9d63b1
PM
45 dnl Support Microsoft deprecated alias function names by default.
46 GNULIB_MDA_CREAT=1; AC_SUBST([GNULIB_MDA_CREAT])
47 GNULIB_MDA_OPEN=1; AC_SUBST([GNULIB_MDA_OPEN])
6ec2e0f5
SDJ
48 dnl Assume proper GNU behavior unless another module says otherwise.
49 HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
50 HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
c0c3707f 51 REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
6ec2e0f5
SDJ
52 REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
53 REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
54 REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
55])
This page took 0.254251 seconds and 4 git commands to generate.