From ddb97ab3b1a6477309f46f5b240fc5ddae8d340a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 29 Aug 2006 21:53:29 +0000 Subject: * 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 . (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. --- m4/ChangeLog | 6 ++++++ m4/stat-prog.m4 | 34 +++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 11 deletions(-) (limited to 'm4') 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 + + * 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 * .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 ]) -- cgit v1.2.3-54-g00ecf