diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | tests/runtests.c | 15 | ||||
-rw-r--r-- | util/util.h | 26 |
4 files changed, 19 insertions, 34 deletions
diff --git a/Makefile.am b/Makefile.am index 7716ba1..b433f6d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,7 +105,7 @@ tests_portable_snprintf_t_LDADD = tests/libtest.a util/libutil.a \ tests_util_concat_t_LDADD = tests/libtest.a util/libutil.a \ portable/libportable.a tests_util_messages_t_LDADD = tests/libtest.a util/libutil.a \ - portable/libportable. + portable/libportable.a tests_util_xmalloc_LDADD = util/libutil.a portable/libportable.a check-local: $(check_PROGRAMS) diff --git a/configure.ac b/configure.ac index 7ed2988..1df3b21 100644 --- a/configure.ac +++ b/configure.ac @@ -6,11 +6,12 @@ dnl Copyright 2006 Board of Trustees, Leland Stanford Jr. University dnl dnl See README for licensing terms. -AC_REVISION($Revision$) -AC_PREREQ(2.57) +AC_REVISION([$Revision$]) +AC_PREREQ([2.61]) AC_INIT([wallet], [0.1], [rra@stanford.edu]) AC_CONFIG_AUX_DIR([tools]) -AM_INIT_AUTOMAKE +AC_CONFIG_LIBOBJ_DIR([portable]) +AM_INIT_AUTOMAKE([1.10]) AM_MAINTAINER_MODE AFS_CPPFLAGS= @@ -52,6 +53,7 @@ fi AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL +AC_PROG_RANLIB AC_SEARCH_LIBS([gethostbyname], [nsl]) AC_SEARCH_LIBS([socket], [socket], , [AC_CHECK_LIB([nsl], [socket], @@ -74,7 +76,9 @@ AC_CHECK_DECLS([snprintf, vsnprintf]) AC_CHECK_DECLS([ubik_Call], , , [#include <ubik.h>]) RRA_C_C99_VAMACROS RRA_C_GNU_VAMACROS +AC_CHECK_TYPES([long long]) RRA_FUNC_SNPRINTF +AC_CHECK_FUNCS([setrlimit]) AC_REPLACE_FUNCS([asprintf]) save_LIBS=$LIBS diff --git a/tests/runtests.c b/tests/runtests.c index f9da690..d15d19c 100644 --- a/tests/runtests.c +++ b/tests/runtests.c @@ -59,6 +59,11 @@ /* sys/time.h must be included before sys/resource.h on some platforms. */ #include <sys/resource.h> +/* AIX doesn't have WCOREDUMP. */ +#ifndef WCOREDUMP +# define WCOREDUMP(status) ((unsigned)(status) & 0x80) +#endif + /* Test status codes. */ enum test_status { TEST_FAIL, @@ -113,13 +118,13 @@ Failed Set Fail/Total (%) Skip Stat Failing Tests\n\ static void sysdie(const char *format, ...); static void *x_malloc(size_t, const char *file, int line); static char *x_strdup(const char *, const char *file, int line); -static int test_analyze(const struct testset *); +static int test_analyze(struct testset *); static int test_batch(const char *testlist); static void test_checkline(const char *line, struct testset *); static void test_fail_summary(const struct testlist *); static int test_init(const char *line, struct testset *); static int test_print_range(int first, int last, int chars, int limit); -static void test_summarize(const struct testset *, int status); +static void test_summarize(struct testset *, int status); static pid_t test_start(const char *path, int *fd); static double tv_diff(const struct timeval *, const struct timeval *); static double tv_seconds(const struct timeval *); @@ -404,7 +409,7 @@ test_print_range(int first, int last, int chars, int limit) with a non-zero status, and a negative integer representing the signal that terminated it if it was killed by a signal. */ static void -test_summarize(const struct testset *ts, int status) +test_summarize(struct testset *ts, int status) { int i; int missing = 0; @@ -478,7 +483,7 @@ test_summarize(const struct testset *ts, int status) few special error messages, and then pass it along to test_summarize() for the regular output. */ static int -test_analyze(const struct testset *ts) +test_analyze(struct testset *ts) { if (ts->reported) return 0; @@ -578,7 +583,7 @@ test_run(struct testset *ts) static void test_fail_summary(const struct testlist *fails) { - const struct testset *ts; + struct testset *ts; int i, chars, total, first, last; puts(header); diff --git a/util/util.h b/util/util.h index e2fce86..386bdd5 100644 --- a/util/util.h +++ b/util/util.h @@ -20,35 +20,11 @@ #define UTIL_UTIL_H 1 #include <config.h> -#include <portable/gssapi.h> - -#include <stdarg.h> -#include <sys/types.h> - -/* __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7 - could you use the __format__ form of the attributes, which is what we use - (to avoid confusion with other macros). */ -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __attribute__(spec) /* empty */ -# endif -#endif +#include <system.h> /* Used for unused parameters to silence gcc warnings. */ #define UNUSED __attribute__((__unused__)) -/* BEGIN_DECLS is used at the beginning of declarations so that C++ - compilers don't mangle their names. END_DECLS is used at the end. */ -#undef BEGIN_DECLS -#undef END_DECLS -#ifdef __cplusplus -# define BEGIN_DECLS extern "C" { -# define END_DECLS } -#else -# define BEGIN_DECLS /* empty */ -# define END_DECLS /* empty */ -#endif - BEGIN_DECLS /* Forward declarations to avoid includes. */ |