New upstream version 1.9
[debian/gzip] / m4 / openat.m4
index fdeb1de6a3db1a90eda25f7c8708e43c2c2d5b93..e8377201fdd7a2a2827629f0e4a84f70dafe34fa 100644 (file)
@@ -1,7 +1,7 @@
-# serial 45
+# serial 46
 # See if we need to use our replacement for Solaris' openat et al functions.
 
-dnl Copyright (C) 2004-2016 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2018 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.
@@ -14,10 +14,12 @@ AC_DEFUN([gl_FUNC_OPENAT],
   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
   AC_CHECK_FUNCS_ONCE([openat])
   AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
-  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
-  yes+*yes)
+  AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
+  case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
+  yes+*yes+yes)
     ;;
   yes+*)
+    # Solaris 10 lacks O_CLOEXEC.
     # Solaris 9 has *at functions, but uniformly mishandles trailing
     # slash in all of them.
     REPLACE_OPENAT=1