From: Ken Hornstein Date: Tue, 4 May 2010 18:04:59 +0000 (-0400) Subject: fix dumptool on macos X-Git-Tag: openafs-devel-1_5_76~143 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=cdef1c67aeaedffadf41069f46e0144f5f1b3a29 fix dumptool on macos make dumptool in test suite compile on macos again Change-Id: Id60f625ce53bc9695673b68c733fa653521a8122 Reviewed-on: http://gerrit.openafs.org/2387 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- diff --git a/acinclude.m4 b/acinclude.m4 index bf538fb..b724c50 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1268,6 +1268,7 @@ AC_CHECK_FUNCS(snprintf strlcat strlcpy flock getrlimit) AC_CHECK_FUNCS(setprogname getprogname sigaction mkstemp vsnprintf strerror strcasestr) AC_CHECK_FUNCS(setvbuf vsyslog getcwd) AC_CHECK_FUNCS(regcomp regexec regerror) +AC_CHECK_FUNCS(fseeko64 ftello64) AC_MSG_CHECKING([for POSIX regex library]) if test "$ac_cv_header_regex_h" = "yes" && \ test "$ac_cv_func_regcomp" = "yes" && \ @@ -1297,6 +1298,7 @@ AC_CHECK_TYPE([socklen_t],[], [Define to int if does not define.])], [#include #include ]) +AC_CHECK_TYPES(off64_t) AC_SIZEOF_TYPE(long) AC_HEADER_PAM_CONST diff --git a/src/tests/dumptool.c b/src/tests/dumptool.c index affa5f9..218a2a8 100644 --- a/src/tests/dumptool.c +++ b/src/tests/dumptool.c @@ -75,6 +75,7 @@ #include #include #include +#include #include #include @@ -96,6 +97,16 @@ #include +#ifndef HAVE_OFF64_T +typedef off_t off64_t; +#endif /* !HAVE_OFF64_T */ +#ifndef HAVE_FSEEKO64 +#define fseeko64 fseeko +#endif /* HAVE_FSEEKO64 */ +#ifndef HAVE_FTELLO64 +#define ftello64 ftello +#endif /* HAVE_FTELLO64 */ + /* * Sigh. Linux blows it again */ @@ -1419,8 +1430,8 @@ DirListInternal(struct vnodeData *vdata, char *pathnames[], int numpathnames, c = '*'; else c = ' '; - printf("%s%-*c", ep->name, longestname - strlen(ep->name), - c); + printf("%s%-*c", ep->name, (int)(longestname - + strlen(ep->name)), c); } else printf("%-*s", longestname, ep->name); }