summaryrefslogtreecommitdiffstats
path: root/gl/m4/fcntl-o.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2021-11-17 01:05:54 +0100
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-07-24 19:35:11 +0200
commita405fc138596f552581d2011fd6de02d5c8186c4 (patch)
tree4c084700b5cb5e9fcedf982a2d921bbc41d9935a /gl/m4/fcntl-o.m4
parent9f2a9ca3d72023ff9b5707d1872c54d65edc9017 (diff)
downloadmonitoring-plugins-a405fc1.tar.gz
Sync with the latest Gnulib code (1a268176f)
Diffstat (limited to 'gl/m4/fcntl-o.m4')
-rw-r--r--gl/m4/fcntl-o.m422
1 files changed, 14 insertions, 8 deletions
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 87cc4bd2..7c459ad1 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,23 +1,22 @@
1# fcntl-o.m4 serial 4 1# fcntl-o.m4 serial 7
2dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl with or without modifications, as long as this notice is preserved.
6 6
7dnl Written by Paul Eggert. 7dnl Written by Paul Eggert.
8 8
9AC_PREREQ([2.60])
10
9# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. 11# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
10# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. 12# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
11# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. 13# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
12AC_DEFUN([gl_FCNTL_O_FLAGS], 14AC_DEFUN([gl_FCNTL_O_FLAGS],
13[ 15[
14 dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW. 16 dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
15 dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes 17 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
16 dnl AC_GNU_SOURCE.
17 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
18 [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
19 [AC_REQUIRE([AC_GNU_SOURCE])])
20 18
19 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
21 AC_CHECK_HEADERS_ONCE([unistd.h]) 20 AC_CHECK_HEADERS_ONCE([unistd.h])
22 AC_CHECK_FUNCS_ONCE([symlink]) 21 AC_CHECK_FUNCS_ONCE([symlink])
23 AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], 22 AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
@@ -33,6 +32,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
33 # defined sleep(n) _sleep ((n) * 1000) 32 # defined sleep(n) _sleep ((n) * 1000)
34 #endif 33 #endif
35 #include <fcntl.h> 34 #include <fcntl.h>
35 ]GL_MDA_DEFINES[
36 #ifndef O_NOATIME 36 #ifndef O_NOATIME
37 #define O_NOATIME 0 37 #define O_NOATIME 0
38 #endif 38 #endif
@@ -116,7 +116,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
116 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( 116 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
117 *) gl_cv_header_working_fcntl_h='no';; 117 *) gl_cv_header_working_fcntl_h='no';;
118 esac], 118 esac],
119 [gl_cv_header_working_fcntl_h=cross-compiling])]) 119 [case "$host_os" in
120 # Guess 'no' on native Windows.
121 mingw*) gl_cv_header_working_fcntl_h='no' ;;
122 *) gl_cv_header_working_fcntl_h=cross-compiling ;;
123 esac
124 ])
125 ])
120 126
121 case $gl_cv_header_working_fcntl_h in #( 127 case $gl_cv_header_working_fcntl_h in #(
122 *O_NOATIME* | no | cross-compiling) ac_val=0;; #( 128 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(