summaryrefslogtreecommitdiff
path: root/m4/stat.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/stat.m4')
-rw-r--r--m4/stat.m415
1 files changed, 11 insertions, 4 deletions
diff --git a/m4/stat.m4 b/m4/stat.m4
index d67dbcdec..a8b79f5bc 100644
--- a/m4/stat.m4
+++ b/m4/stat.m4
@@ -1,4 +1,4 @@
-# serial 8
+# serial 10
# Copyright (C) 2009-2012 Free Software Foundation, Inc.
#
@@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT],
mingw*) gl_cv_func_stat_dir_slash="guessing no";;
*) gl_cv_func_stat_dir_slash="guessing yes";;
esac])])
- dnl AIX 7.1, Solaris 9 mistakenly succeed on stat("file/")
- dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+ dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/").
+ dnl (For mingw, this is due to a broken stat() override in libmingwex.a.)
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/").
AC_CACHE_CHECK([whether stat handles trailing slashes on files],
[gl_cv_func_stat_file_slash],
[touch conftest.tmp
@@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT],
return result;
]])],
[gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
- [gl_cv_func_stat_file_slash="guessing no"])
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_stat_file_slash="guessing no" ;;
+ esac
+ ])
rm -f conftest.tmp conftest.lnk])
case $gl_cv_func_stat_dir_slash in
*no) REPLACE_STAT=1