> 1) To require AC_SYS_LARGEFILE, and a module dependency to 'largefile'.
> This will make statvfs() use a 64-bit f_blocks on
> glibc/Hurd, MacOS X >= 10.4, HP-UX, Solaris.
Here's the first proposed patch. I verified that
- on HP-UX 11.00 and 11.31, Solaris 7 and 10, it causes statvfs() to be used
again:
checking for statvfs function (SVR4)... no
becomes
checking for statvfs function (SVR4)... yes
Since the check_f_blocks_size is in place, it proves that this causes
f_blocks to be 64-bit.
- on MacOS X 10.5, it causes fsusage.o to call statfs$INODE64 instead of
statfs, thus also supporting large volumes.
2011-07-23 Bruno Haible <[email protected]>
fsusage: Enable large volume support on glibc/Hurd, HP-UX, Solaris,
MacOS X.
* m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Require AC_SYS_LARGEFILE.
* modules/fsusage (Depends-on): Add largefile.
--- m4/fsusage.m4.orig Sat Jul 23 16:25:19 2011
+++ m4/fsusage.m4 Sat Jul 23 16:24:57 2011
@@ -1,4 +1,4 @@
-# serial 28
+# serial 29
# Obtaining file system usage information.
# Copyright (C) 1997-1998, 2000-2001, 2003-2011 Free Software Foundation, Inc.
@@ -29,6 +29,12 @@
AC_DEFUN([gl_FILE_SYSTEM_USAGE],
[
+dnl Enable large-file support. This has the effect of changing the size
+dnl of field f_blocks in 'struct statvfs' from 32 bit to 64 bit on
+dnl glibc/Hurd, HP-UX 11, Solaris (32-bit mode). It also changes the size
+dnl of field f_blocks in 'struct statfs' from 32 bit to 64 bit on
+dnl MacOS X >= 10.5 (32-bit mode).
+AC_REQUIRE([AC_SYS_LARGEFILE])
AC_MSG_NOTICE([checking how to get file system space usage])
ac_fsusage_space=no
--- modules/fsusage.orig Sat Jul 23 16:25:19 2011
+++ modules/fsusage Sat Jul 23 16:06:17 2011
@@ -7,6 +7,7 @@
m4/fsusage.m4
Depends-on:
+largefile
stdbool
stdint
full-read [test $gl_cv_fs_space = yes]
--
In memoriam Adam Czerniaków <http://en.wikipedia.org/wiki/Adam_Czerniaków>