From 099052efc7b038dad4b69955ecaf3609f0df8d88 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 8 Jul 2012 11:32:16 +0400 Subject: [PATCH] Sync with gnulib 0a6dafee2bb8f69a931345a1f67d835ee5062967 Avoid needless check on GNU/Linux. * m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Omit STAT_STATFS3_OSF1 check on GNU/Linux systems, since it can't possibly work. Signed-off-by: Andrew Borodin --- m4.include/fsusage.m4 | 53 ++++++++++++++++++++++--------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/m4.include/fsusage.m4 b/m4.include/fsusage.m4 index 890217428..adf27d4c2 100644 --- a/m4.include/fsusage.m4 +++ b/m4.include/fsusage.m4 @@ -102,32 +102,6 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1]; fi fi -if test $ac_fsusage_space = no; then - # DEC Alpha running OSF/1 - AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) - AC_CACHE_VAL([fu_cv_sys_stat_statfs3_osf1], - [AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -#include -#include - int - main () - { - struct statfs fsd; - fsd.f_fsize = 0; - return statfs (".", &fsd, sizeof (struct statfs)) != 0; - }]])], - [fu_cv_sys_stat_statfs3_osf1=yes], - [fu_cv_sys_stat_statfs3_osf1=no], - [fu_cv_sys_stat_statfs3_osf1=no])]) - AC_MSG_RESULT([$fu_cv_sys_stat_statfs3_osf1]) - 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)]) - fi -fi - # Check for this unconditionally so we have a # good fallback on glibc/Linux > 2.6 < 2.6.36 AC_MSG_CHECKING([for two-argument statfs with statfs.f_frsize member]) @@ -154,11 +128,38 @@ AC_CACHE_VAL([fu_cv_sys_stat_statfs2_frsize], [fu_cv_sys_stat_statfs2_frsize=no])]) AC_MSG_RESULT([$fu_cv_sys_stat_statfs2_frsize]) if test $fu_cv_sys_stat_statfs2_frsize = yes; then + ac_fsusage_space=yes AC_DEFINE([STAT_STATFS2_FRSIZE], [1], [ Define if statfs takes 2 args and struct statfs has a field named f_frsize. (glibc/Linux > 2.6)]) fi +if test $ac_fsusage_space = no; then + # DEC Alpha running OSF/1 + AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) + AC_CACHE_VAL([fu_cv_sys_stat_statfs3_osf1], + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ +#include +#include +#include + int + main () + { + struct statfs fsd; + fsd.f_fsize = 0; + return statfs (".", &fsd, sizeof (struct statfs)) != 0; + }]])], + [fu_cv_sys_stat_statfs3_osf1=yes], + [fu_cv_sys_stat_statfs3_osf1=no], + [fu_cv_sys_stat_statfs3_osf1=no])]) + AC_MSG_RESULT([$fu_cv_sys_stat_statfs3_osf1]) + 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)]) + fi +fi + if test $ac_fsusage_space = no; then # glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4. # (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,