Bruno Haible wrote: > Paul Eggert wrote: >> Subject: [PATCH 3/3] fsusage: port to MacOS X 10.7 with 4 TiB file systems >> >> * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Reject statvfs >> implementations that use only 32 bits to count blocks. > > But this change has also effects on other platforms than MacOS X 10.7: > > - On glibc/Hurd, the type of f_blocks in 'struct statvfs' is __fsblkcnt64_t or ... > - On MacOS X 10.5, the type of f_blocks is fsblkcnt_t, which is ... > - On FreeBSD 6.4, NetBSD 3.0..5.0, OpenBSD 4.9, the type of f_blocks is ... > - On AIX 5.1..7.1, the type of f_blocks is fsblkcnt_t, which is 'unsigned > long', ... > - On HP-UX 11.00..11.31, the type of f_blocks is fsblkcnt_t, which is 64-bit ... > - On IRIX 6.5, the type of f_blocks is fsblkcnt_t, which is already a 64-bit ... > - On Solaris 7..10, the type of f_blocks is fsblkcnt_t, which is 64-bit in ... > - On Cygwin (both 1.5.x and 1.7.5), the type of f_blocks is fsblkcnt_t, which ... > - On Interix 3.5, the type of f_blocks is 'unsigned long', which is 32-bit. ... > - On BeOS and Haiku, the type of f_blocks is fsblkcnt_t, which is 'long long', ... > > I will therefore propose > > 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. > > 2) To undo the patch that introduces check_f_blocks_size, because > - on MacOS X 10.7 it is not needed any more after 1), > - on AIX and Cywin it causes non-POSIX API to be used for no reason, > - it kills portability to Interix 3.5. > > 3) To make use of statvfs64 on AIX.
Wow. Thanks for all the analysis and testing.