summaryrefslogtreecommitdiff
path: root/gnulib-m4/fcntl-o.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-m4/fcntl-o.m4')
-rw-r--r--gnulib-m4/fcntl-o.m413
1 files changed, 10 insertions, 3 deletions
diff --git a/gnulib-m4/fcntl-o.m4 b/gnulib-m4/fcntl-o.m4
index 24fcf88..b388d89 100644
--- a/gnulib-m4/fcntl-o.m4
+++ b/gnulib-m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 4
-dnl Copyright (C) 2006, 2009-2016 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 5
+dnl Copyright (C) 2006, 2009-2017 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,6 +18,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
[AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
[AC_REQUIRE([AC_GNU_SOURCE])])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_FUNCS_ONCE([symlink])
AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
@@ -116,7 +117,13 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
*) gl_cv_header_working_fcntl_h='no';;
esac],
- [gl_cv_header_working_fcntl_h=cross-compiling])])
+ [case "$host_os" in
+ # Guess 'no' on native Windows.
+ mingw*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
+ esac
+ ])
+ ])
case $gl_cv_header_working_fcntl_h in #(
*O_NOATIME* | no | cross-compiling) ac_val=0;; #(