Mercurial > hg > octave-jordi > gnulib-hg
changeset 7247:c77c9dc7d8c6
* lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
HAVE_STRUCT_STATFS_F_FSTYPENAME.
* m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
of doing all the work ourselves.
* m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Fri, 01 Sep 2006 19:49:22 +0000 |
parents | 4a748ab30907 |
children | edd0f5855283 |
files | lib/ChangeLog lib/mountlist.c m4/ChangeLog m4/fstypename.m4 m4/fsusage.m4 |
diffstat | 5 files changed, 28 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2006-09-01 Paul Eggert <eggert@cs.ucla.edu> + + * mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by + HAVE_STRUCT_STATFS_F_FSTYPENAME. + 2006-08-31 Paul Eggert <eggert@cs.ucla.edu> * getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
--- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -170,7 +170,7 @@ #if MOUNTED_GETMNTINFO -# if ! HAVE_F_FSTYPENAME_IN_STATFS +# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME static char * fstype_to_string (short int t) { @@ -264,12 +264,12 @@ return "?"; } } -# endif /* ! HAVE_F_FSTYPENAME_IN_STATFS */ +# endif static char * fsp_to_string (const struct statfs *fsp) { -# if defined HAVE_F_FSTYPENAME_IN_STATFS +# if HAVE_STRUCT_STATFS_F_FSTYPENAME return (char *) (fsp->f_fstypename); # else return fstype_to_string (fsp->f_type);
--- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,10 @@ +2006-09-01 Paul Eggert <eggert@cs.ucla.edu> + + * fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead + of doing all the work ourselves. + * fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for + sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H. + 2006-08-31 Paul Eggert <eggert@cs.ucla.edu> * fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
--- a/m4/fstypename.m4 +++ b/m4/fstypename.m4 @@ -1,37 +1,22 @@ -#serial 5 +#serial 6 dnl From Jim Meyering. dnl dnl See if struct statfs has the f_fstypename member. -dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. +dnl If so, define HAVE_STRUCT_STATFS_F_FSTYPENAME. dnl -# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc. +# Copyright (C) 1998, 1999, 2001, 2004, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FSTYPENAME], - [ - AC_CACHE_CHECK([for f_fstypename in struct statfs], - fu_cv_sys_f_fstypename_in_statfs, - [ - AC_TRY_COMPILE( - [ -#include <sys/param.h> -#include <sys/types.h> -#include <sys/mount.h> - ], - [struct statfs s; int i = sizeof s.f_fstypename;], - fu_cv_sys_f_fstypename_in_statfs=yes, - fu_cv_sys_f_fstypename_in_statfs=no - ) - ] - ) - - if test $fu_cv_sys_f_fstypename_in_statfs = yes; then - AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1, - [Define if struct statfs has the f_fstypename member.]) - fi - ] -) +[ + AC_CHECK_MEMBERS([struct statfs.f_fstypename],,, + [ + #include <sys/types.h> + #include <sys/param.h> + #include <sys/mount.h> + ]) +])
--- a/m4/fsusage.m4 +++ b/m4/fsusage.m4 @@ -1,4 +1,4 @@ -#serial 19 +#serial 20 # Obtaining file system usage information. # Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software @@ -259,6 +259,6 @@ # Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], [ - AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) + AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h) gl_STATFS_TRUNCATES ])