summaryrefslogtreecommitdiff
path: root/m4/fcntl_h.m4
diff options
context:
space:
mode:
authorDaniel Llorens <lloda@sarc.name>2021-08-16 13:23:27 +0200
committerDaniel Llorens <lloda@sarc.name>2021-08-16 13:23:27 +0200
commitb4a80f4239b19fea4d2cc3e9d197f24b809f0624 (patch)
treeb4dc728ec96391e302df4f7c733bf592a3976ff2 /m4/fcntl_h.m4
parent5df5555d12f1408a66a5368a918abb981edf5445 (diff)
downloadguile-b4a80f4239b19fea4d2cc3e9d197f24b809f0624.tar.gz
Update gnulib to 8f4538a53d64054ae2fc8b86c0f87c418c6176e6
Includes gnulib:0c907f7da13232908f05c415b8cec56024071906 to fix #49930 https://lists.gnu.org/archive/html/bug-guile/2021-08/msg00003.html.
Diffstat (limited to 'm4/fcntl_h.m4')
-rw-r--r--m4/fcntl_h.m439
1 files changed, 27 insertions, 12 deletions
diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4
index e63a82f10..aba44735d 100644
--- a/m4/fcntl_h.m4
+++ b/m4/fcntl_h.m4
@@ -1,4 +1,4 @@
-# serial 17
+# serial 20
# Configure fcntl.h.
dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -7,7 +7,7 @@ dnl with or without modifications, as long as this notice is preserved.
dnl Written by Paul Eggert.
-AC_DEFUN([gl_FCNTL_H],
+AC_DEFUN_ONCE([gl_FCNTL_H],
[
AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
AC_REQUIRE([gl_FCNTL_O_FLAGS])
@@ -26,25 +26,40 @@ AC_DEFUN([gl_FCNTL_H],
]], [fcntl openat])
])
+# gl_FCNTL_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
[
- dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
- AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ dnl Ensure to expand the default settings once only.
+ gl_FCNTL_H_REQUIRE_DEFAULTS
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
dnl Define it also as a C macro, for the benefit of the unit tests.
gl_MODULE_INDICATOR_FOR_TESTS([$1])
])
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT])
+ dnl Support Microsoft deprecated alias function names by default.
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+])
+
AC_DEFUN([gl_FCNTL_H_DEFAULTS],
[
- GNULIB_CREAT=0; AC_SUBST([GNULIB_CREAT])
- GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
- GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING])
- GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
- GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
- dnl Support Microsoft deprecated alias function names by default.
- GNULIB_MDA_CREAT=1; AC_SUBST([GNULIB_MDA_CREAT])
- GNULIB_MDA_OPEN=1; AC_SUBST([GNULIB_MDA_OPEN])
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])