Blame m4/fcntl_h.m4

Packit Service 4684c1
# serial 16
Packit Service 4684c1
# Configure fcntl.h.
Packit Service 4684c1
dnl Copyright (C) 2006-2007, 2009-2020 Free Software Foundation, Inc.
Packit Service 4684c1
dnl This file is free software; the Free Software Foundation
Packit Service 4684c1
dnl gives unlimited permission to copy and/or distribute it,
Packit Service 4684c1
dnl with or without modifications, as long as this notice is preserved.
Packit Service 4684c1
Packit Service 4684c1
dnl Written by Paul Eggert.
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_FCNTL_H],
Packit Service 4684c1
[
Packit Service 4684c1
  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
Packit Service 4684c1
  AC_REQUIRE([gl_FCNTL_O_FLAGS])
Packit Service 4684c1
  gl_NEXT_HEADERS([fcntl.h])
Packit Service 4684c1
Packit Service 4684c1
  dnl Ensure the type pid_t gets defined.
Packit Service 4684c1
  AC_REQUIRE([AC_TYPE_PID_T])
Packit Service 4684c1
Packit Service 4684c1
  dnl Ensure the type mode_t gets defined.
Packit Service 4684c1
  AC_REQUIRE([AC_TYPE_MODE_T])
Packit Service 4684c1
Packit Service 4684c1
  dnl Check for declarations of anything we want to poison if the
Packit Service 4684c1
  dnl corresponding gnulib module is not in use, if it is not common
Packit Service 4684c1
  dnl enough to be declared everywhere.
Packit Service 4684c1
  gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
Packit Service 4684c1
    ]], [fcntl openat])
Packit Service 4684c1
])
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
Packit Service 4684c1
[
Packit Service 4684c1
  dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
Packit Service 4684c1
  AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
Packit Service 4684c1
  gl_MODULE_INDICATOR_SET_VARIABLE([$1])
Packit Service 4684c1
  dnl Define it also as a C macro, for the benefit of the unit tests.
Packit Service 4684c1
  gl_MODULE_INDICATOR_FOR_TESTS([$1])
Packit Service 4684c1
])
Packit Service 4684c1
Packit Service 4684c1
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
Packit Service 4684c1
[
Packit Service 4684c1
  GNULIB_CREAT=0;        AC_SUBST([GNULIB_CREAT])
Packit Service 4684c1
  GNULIB_FCNTL=0;        AC_SUBST([GNULIB_FCNTL])
Packit Service 4684c1
  GNULIB_NONBLOCKING=0;  AC_SUBST([GNULIB_NONBLOCKING])
Packit Service 4684c1
  GNULIB_OPEN=0;         AC_SUBST([GNULIB_OPEN])
Packit Service 4684c1
  GNULIB_OPENAT=0;       AC_SUBST([GNULIB_OPENAT])
Packit Service 4684c1
  dnl Assume proper GNU behavior unless another module says otherwise.
Packit Service 4684c1
  HAVE_FCNTL=1;          AC_SUBST([HAVE_FCNTL])
Packit Service 4684c1
  HAVE_OPENAT=1;         AC_SUBST([HAVE_OPENAT])
Packit Service 4684c1
  REPLACE_CREAT=0;       AC_SUBST([REPLACE_CREAT])
Packit Service 4684c1
  REPLACE_FCNTL=0;       AC_SUBST([REPLACE_FCNTL])
Packit Service 4684c1
  REPLACE_OPEN=0;        AC_SUBST([REPLACE_OPEN])
Packit Service 4684c1
  REPLACE_OPENAT=0;      AC_SUBST([REPLACE_OPENAT])
Packit Service 4684c1
])