summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-05-11 20:54:15 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-05-11 20:56:51 -0700
commitc25bdbae48977a527dff69150f59fb0746d31b51 (patch)
tree65c73b823650ebefa482d763045798ecb1f4da1b /m4
parent1f96aa01f72bba8c9a0600280594a1a92bb505fc (diff)
downloadgnulib-c25bdbae48977a527dff69150f59fb0746d31b51.tar.gz
fsusage: check for GNU/Linux statvfs problem dynamically
Problem reported by Nikolaus Rath in <http://bugs.gnu.org/11406>. * lib/fsusage.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]: Define STAT_STATFS2_BSIZE too, since in this case the code now checks dynamically whether statvfs is reliable, falling back on Linux-style statfs otherwise. (statvfs_works): New function, for dynamically testing statvfs. (get_fs_usage) [STAT_STATVFS]: Use it. * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for statvfs on GNU/Linux hosts, since it's now done dynamically.
Diffstat (limited to 'm4')
-rw-r--r--m4/fsusage.m48
1 files changed, 0 insertions, 8 deletions
diff --git a/m4/fsusage.m4 b/m4/fsusage.m4
index 519743fb28..f87834eeb4 100644
--- a/m4/fsusage.m4
+++ b/m4/fsusage.m4
@@ -50,14 +50,6 @@ if test $ac_fsusage_space = no; then
# OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
AC_CACHE_CHECK([for statvfs function (SVR4)], [fu_cv_sys_stat_statvfs],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
-#if (defined __GLIBC__ || defined __UCLIBC__) && defined __linux__
-Do not use statvfs on systems with GNU libc on Linux, because that function
-stats all preceding entries in /proc/mounts, and that makes df hang if even
-one of the corresponding file systems is hard-mounted, but not available.
-statvfs in GNU libc on Hurd, BeOS, Haiku operates differently: it only makes
-a system call.
-#endif
-
#ifdef __osf__
"Do not use Tru64's statvfs implementation"
#endif