diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-19 13:39:08 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-19 13:39:08 (GMT) |
commit | 74b6984047d330a3cc7cb7f63645849fe7676c63 (patch) | |
tree | 65a26800103d8d66f7e6cb4acfbfc9f315ec750b /gl/m4/fcntl-o.m4 | |
parent | 423284edfa980fc3fdb51ab20af96685a988ba97 (diff) | |
parent | c07206f2ccc2356aa74bc6813a94c2190017d44e (diff) | |
download | monitoring-plugins-74b6984047d330a3cc7cb7f63645849fe7676c63.tar.gz |
Merge branch 'master' into check_icmp_cleanuprefs/pull/1807/head
Diffstat (limited to 'gl/m4/fcntl-o.m4')
-rw-r--r-- | gl/m4/fcntl-o.m4 | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4 index 87cc4bd..59d558b 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 |
2 | dnl Copyright (C) 2006, 2009-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
6 | 6 | ||
7 | dnl Written by Paul Eggert. | 7 | dnl Written by Paul Eggert. |
8 | 8 | ||
9 | AC_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. |
12 | AC_DEFUN([gl_FCNTL_O_FLAGS], | 14 | AC_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;; #( |