summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-29 21:53:29 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-29 21:53:29 +0000
commitddb97ab3b1a6477309f46f5b240fc5ddae8d340a (patch)
tree478a54d1bf38ab5cf14140ac9392f5ea0aac8a6c /m4
parentbc7aa2329c189fc1f028be90cba56bb4e3ae04a1 (diff)
downloadcoreutils-ddb97ab3b1a6477309f46f5b240fc5ddae8d340a.tar.xz
* src/stat.c (HAVE_STRUCT_STATXFS_F_FSID_VAL, FSID_VAL): New macros, to
work around a Mac OS X porting problem reported by Bruno Haible in <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00308.html>. (print_statfs): Use them. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val components of fsid. Omit some checks that stat.c doesn't care about.
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog6
-rw-r--r--m4/stat-prog.m434
2 files changed, 29 insertions, 11 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index c704969dc..176ef0e7f 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,9 @@
+2006-08-29 Paul Eggert <eggert@cs.ucla.edu>
+
+ * stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for __val versus val
+ components of fsid. Omit some checks that stat.c doesn't care
+ about.
+
2006-08-26 Paul Eggert <eggert@cs.ucla.edu>
* .cvsignore: Add config-h.m4.
diff --git a/m4/stat-prog.m4 b/m4/stat-prog.m4
index 17ec1e958..7b0039558 100644
--- a/m4/stat-prog.m4
+++ b/m4/stat-prog.m4
@@ -52,16 +52,28 @@ $ac_includes_default
# endif
#endif
"
- AC_CHECK_MEMBERS([struct statfs.f_basetype],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_basetype],,,[$statxfs_includes])
AC_CHECK_MEMBERS([struct statfs.f_fstypename],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_fstypename],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statfs.f_type],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_type],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statfs.f_fsid.__val],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_fsid.__val],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statfs.f_namemax],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_namemax],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statfs.f_namelen],,,[$statxfs_includes])
- AC_CHECK_MEMBERS([struct statvfs.f_namelen],,,[$statxfs_includes])
+ dnl Keep this long conditional in sync with the USE_STATVFS conditional
+ dnl in ../src/stat.c.
+ if test $ac_cv_header_sys_statvfs_h = yes &&
+ { AC_CHECK_MEMBERS(
+ [struct statvfs.f_basetype,
+ struct statvfs.f_fstypename,
+ struct statvfs.f_type],,,
+ [$statxfs_includes])
+ test $ac_cv_member_struct_statvfs_f_basetype = yes ||
+ test $ac_cv_member_struct_statvfs_f_fstypename = yes ||
+ { test $ac_cv_member_struct_statvfs_f_type = yes &&
+ test $ac_cv_member_struct_statfs_f_fstypename != yes; }; }; then
+ AC_CHECK_MEMBERS(
+ [struct statvfs.f_fsid.__val, struct statvfs.f_fsid.val,
+ struct statvfs.f_namelen, struct statvfs.f_namemax],,,
+ [$statxfs_includes])
+ else
+ AC_CHECK_MEMBERS(
+ [struct statfs.f_basetype, struct statfs.f_fsid.__val,
+ struct statfs.f_fsid.val, struct statfs.f_namelen,
+ struct statfs.f_namemax, struct statfs.f_type],,,
+ [$statxfs_includes])
+ fi
])