X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ffsusage.m4;h=6277bfa5c5b60ef205574a8903bd64038bf7586d;hb=da8054d48dc22e1c051db54049e005d51a006e69;hp=1549e05b44e125458e73a9363102969b5a663c4c;hpb=06b335ade65c8fe60fee8b9e18b670bb54ed924a;p=gnulib.git diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 index 1549e05b4..6277bfa5c 100644 --- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,7 +1,7 @@ # serial 30 # Obtaining file system usage information. -# Copyright (C) 1997-1998, 2000-2001, 2003-2012 Free Software Foundation, Inc. +# Copyright (C) 1997-1998, 2000-2001, 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -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,12 +128,39 @@ 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, # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)