X-Git-Url: http://git.hcoop.net/bpt/guile.git/blobdiff_plain/dd36ce77cd899c7b179026603e751e3bb47b2943..5e69ceb7a667377a61cb0c31d7ac20e245b3fafd:/m4/stat.m4 diff --git a/m4/stat.m4 b/m4/stat.m4 index 27f82d5a9..1ae327b36 100644 --- a/m4/stat.m4 +++ b/m4/stat.m4 @@ -1,6 +1,6 @@ -# serial 7 +# serial 11 -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -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 @@ -58,9 +65,7 @@ AC_DEFUN([gl_FUNC_STAT], AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs help when passed a file name with a trailing slash]);; esac - if test $REPLACE_STAT = 1; then - AC_LIBOBJ([stat]) - dnl Prerequisites of lib/stat.c. - AC_REQUIRE([AC_C_INLINE]) - fi ]) + +# Prerequisites of lib/stat.c. +AC_DEFUN([gl_PREREQ_STAT], [:])