From c25bdbae48977a527dff69150f59fb0746d31b51 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 11 May 2012 20:54:15 -0700 Subject: fsusage: check for GNU/Linux statvfs problem dynamically Problem reported by Nikolaus Rath in . * 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. --- m4/fsusage.m4 | 8 -------- 1 file changed, 8 deletions(-) (limited to 'm4') 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 -#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 -- cgit v1.2.1