fsusage: check for GNU/Linux statvfs problem dynamically
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 May 2012 03:54:15 +0000 (20:54 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 12 May 2012 03:56:51 +0000 (20:56 -0700)
commitc25bdbae48977a527dff69150f59fb0746d31b51
tree65c73b823650ebefa482d763045798ecb1f4da1b
parent1f96aa01f72bba8c9a0600280594a1a92bb505fc
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.
ChangeLog
lib/fsusage.c
m4/fsusage.m4