* lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Sep 2006 19:49:22 +0000 (19:49 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Sep 2006 19:49:22 +0000 (19:49 +0000)
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.

lib/ChangeLog
lib/mountlist.c
m4/ChangeLog
m4/fstypename.m4
m4/fsusage.m4

index 448b0b1..20ca894 100644 (file)
@@ -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
index 1b64241..285c3de 100644 (file)
@@ -170,7 +170,7 @@ char *strstr ();
 
 #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 @@ fstype_to_string (short int t)
       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);
index 4a27348..9fc689a 100644 (file)
@@ -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
index 7ff33e2..aa676f3 100644 (file)
@@ -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>
+    ])
+])
index 23116b5..3ac9965 100644 (file)
@@ -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 @@ choke -- this is a workaround for a Sun-specific problem
 # 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
 ])