From 9e6a7bf2025a49a7904239b1fba1445a79134e65 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Thu, 8 Jan 2015 04:12:29 +0000 Subject: [PATCH] Use AC_CHECK_TYPES to check for struct statfs64 * m4/statfs.m4: Remove. * configure.ac (AC_STATFS64): Remove. (AC_CHECK_TYPES): Add struct statfs64. * statfs.c: Replace HAVE_STATFS64 with HAVE_STRUCT_STATFS64. --- configure.ac | 2 +- m4/statfs.m4 | 15 --------------- statfs.c | 4 ++-- 3 files changed, 3 insertions(+), 18 deletions(-) delete mode 100644 m4/statfs.m4 diff --git a/configure.ac b/configure.ac index 055b2583..8cb72d7a 100644 --- a/configure.ac +++ b/configure.ac @@ -191,7 +191,6 @@ AC_CHECK_MEMBERS(m4_normalize([ struct stat.st_gen, struct stat.st_rdev ])) -AC_STATFS64 AC_TYPE_SIGNAL AC_TYPE_UID_T @@ -262,6 +261,7 @@ AC_CHECK_MEMBERS([struct msghdr.msg_control],,, [#include ]) AC_CHECK_TYPES([struct stat64],,, [#include #include ]) AC_CHECK_TYPES([struct __old_kernel_stat],,, [#include ]) +AC_CHECK_TYPES([struct statfs64],,, [#include ]) AC_CHECK_TYPES([struct pt_all_user_regs, struct ia64_fpreg, struct ptrace_peeksiginfo_args],,, [#include ]) diff --git a/m4/statfs.m4 b/m4/statfs.m4 deleted file mode 100644 index 1a2f9712..00000000 --- a/m4/statfs.m4 +++ /dev/null @@ -1,15 +0,0 @@ -dnl ### A macro to determine whether statfs64 is defined. -AC_DEFUN([AC_STATFS64], -[AC_MSG_CHECKING(for statfs64 in sys/vfs.h) -AC_CACHE_VAL(ac_cv_type_statfs64, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -]], [[struct statfs64 st;]])],[ac_cv_type_statfs64=yes],[ac_cv_type_statfs64=no])]) -AC_MSG_RESULT($ac_cv_type_statfs64) -if test "$ac_cv_type_statfs64" = yes -then - AC_DEFINE([HAVE_STATFS64], 1, -[Define if statfs64 is available in sys/vfs.h.]) -fi -]) diff --git a/statfs.c b/statfs.c index d8583f6e..35f8652f 100644 --- a/statfs.c +++ b/statfs.c @@ -83,7 +83,7 @@ sys_fstatfs(struct tcb *tcp) return 0; } -#ifdef HAVE_STATFS64 +#ifdef HAVE_STRUCT_STATFS64 static void printstatfs64(struct tcb *tcp, long addr) { @@ -197,7 +197,7 @@ sys_fstatfs64(struct tcb *tcp) } return 0; } -#endif /* HAVE_STATFS64 */ +#endif /* HAVE_STRUCT_STATFS64 */ #ifdef ALPHA int