X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ffsusage.m4;h=4592ff888e7c78ebce2abf664f9a0e6aee9a6785;hb=8585ce2ff5698c650ba5d5e3bb99763654ad62e8;hp=ae699dff99e235a032fcd79ffe778dbc4a0d1d69;hpb=1bea6655ca92d51efb6acca53e0301dc07be0fc0;p=gnulib.git diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 index ae699dff9..4592ff888 100644 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,7 +1,7 @@ -# serial 25 +# serial 27 # Obtaining file system usage information. -# Copyright (C) 1997-1998, 2000-2001, 2003-2009 Free Software Foundation, Inc. +# Copyright (C) 1997-1998, 2000-2001, 2003-2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -44,10 +44,11 @@ ac_fsusage_space=no # systems. That system is reported to work fine with STAT_STATFS4 which # is what it gets when this test fails. if test $ac_fsusage_space = no; then - # SVR4 + # glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, + # 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 __linux__ + [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. @@ -60,13 +61,13 @@ a system call. #endif #include ]], - [[struct statvfs fsd; statvfs (0, &fsd);]])], - [fu_cv_sys_stat_statvfs=yes], - [fu_cv_sys_stat_statvfs=no])]) + [[struct statvfs fsd; statvfs (0, &fsd);]])], + [fu_cv_sys_stat_statvfs=yes], + [fu_cv_sys_stat_statvfs=no])]) if test $fu_cv_sys_stat_statvfs = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATVFS], [1], - [ Define if there is a function named statvfs. (SVR4)]) + [ Define if there is a function named statvfs. (SVR4)]) fi fi @@ -92,13 +93,18 @@ if test $ac_fsusage_space = no; then if test $fu_cv_sys_stat_statfs3_osf1 = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS3_OSF1], [1], - [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) + [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) fi fi if test $ac_fsusage_space = no; then -# AIX - AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl + # glibc/Linux, MacOS X < 10.4, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. + # (glibc/{Hurd,kFreeBSD}, MacOS X >= 10.4, FreeBSD >= 5.0, NetBSD >= 3.0, + # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.) + # (On IRIX you need to include , not only and + # .) + # (On Solaris, statfs has 4 arguments.) + AC_MSG_CHECKING([for two-argument statfs with statfs.f_bsize dnl member (AIX, 4.3BSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_bsize], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -131,7 +137,8 @@ member (AIX, 4.3BSD)]) fi if test $ac_fsusage_space = no; then -# SVR3 + # SVR3 + # (Solaris already handled above.) AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs4], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -150,13 +157,17 @@ if test $ac_fsusage_space = no; then if test $fu_cv_sys_stat_statfs4 = yes; then ac_fsusage_space=yes AC_DEFINE([STAT_STATFS4], [1], - [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) + [ Define if statfs takes 4 args. (SVR3, Dynix, old Irix, old AIX, Dolphin)]) fi fi if test $ac_fsusage_space = no; then -# 4.4BSD and NetBSD - AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl + # 4.4BSD and older NetBSD + # (OSF/1 already handled above.) + # (On AIX, you need to include , not only .) + # (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in + # .) + AC_MSG_CHECKING([for two-argument statfs with statfs.f_fsize dnl member (4.4BSD and NetBSD)]) AC_CACHE_VAL([fu_cv_sys_stat_statfs2_fsize], [AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -223,6 +234,7 @@ fi if test $ac_fsusage_space = no; then # SVR2 + # (AIX, HP-UX, OSF/1 already handled above.) AC_PREPROC_IFELSE([AC_LANG_SOURCE([[#include ]])], [AC_DEFINE([STAT_READ_FILSYS], [1],