diff options
| author | Lorenz Kästle <lorenz.kaestle@netways.de> | 2023-03-09 11:03:48 +0100 |
|---|---|---|
| committer | Lorenz Kästle <lorenz.kaestle@netways.de> | 2023-03-09 11:03:48 +0100 |
| commit | d0edb72a0c9bc1a28197ab4566928f7ee63a6d43 (patch) | |
| tree | 6d524fb16d2dd1aa9f2d98529ef1de7a39f52700 /gl/m4/fcntl-o.m4 | |
| parent | 9fdc82f0543c6e2891c7079f70297f92e8ef4619 (diff) | |
| parent | 269718094177fb8a7e3d3005d1310495009fe8c4 (diff) | |
| download | monitoring-plugins-d0edb72.tar.gz | |
Merge branch 'master' into RincewindsHat-patch-1
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 87cc4bd2..59d558bd 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;; #( |
