From ec136784d4328b4c75f622c08273cf9dc6cac40f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 16 Nov 2010 20:12:26 -0600 Subject: Refactor statfs/statvfs type check Turn it into a configure-type typedef, which allows us to reduce the amount of duplicated code and clean up some #ifdef magic in the code itself. Adjust some of the other defined checks to look at the headers available rather than trying to pull in the right ones based on configure checks. Signed-off-by: Dan McGee Signed-off-by: Allan McRae --- configure.ac | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 56e1ed88..473b2906 100644 --- a/configure.ac +++ b/configure.ac @@ -191,27 +191,11 @@ AC_FUNC_FORK AC_FUNC_GETMNTENT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MKTIME -AC_CHECK_FUNCS([geteuid realpath regcomp strcasecmp \ +AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \ strndup strrchr strsep swprintf \ wcwidth uname]) - -# Checks for getmntinfo and determines whether it uses statfs or statvfs -AC_CHECK_FUNC(getmntinfo, - [AC_MSG_CHECKING(parameter style for getmntinfo) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -# include -# include -#if HAVE_SYS_UCRED_H -#include -#endif -extern int getmntinfo (struct statfs **, int); - ]], [])], - [AC_DEFINE(HAVE_GETMNTINFO_STATFS, [], [getmntinfo uses statfs]) - AC_MSG_RESULT(statfs)], - [AC_DEFINE(HAVE_GETMNTINFO_STATVFS, [], [getmntinfo uses statvfs]) - AC_MSG_RESULT(statvfs)]) - ]) - +# For the diskspace code +FS_STATS_TYPE # Enable large file support if available AC_SYS_LARGEFILE -- cgit v1.2.3-70-g09d2