From 92ff7f21ad0b167f8d742a9d7b5f93704a57619c Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Thu, 24 Apr 2008 02:02:49 +0000 Subject: Major coding style cleanup. Updated all shared code from my other projects. The configure option requesting AFS kaserver support (and thus building kasetkey) is now --with-kaserver instead of --with-afs. If KRB5_CONFIG was explicitly set in the environment, don't use a different krb5-config based on --with-krb4 or --with-krb5. If krb5-config isn't executable, don't use it. This allows one to force library probing by setting KRB5_CONFIG to point to a nonexistent file. Sanity-check the results of krb5-config before proceeding and error out in configure if they don't work. Stop setting Stanford-specific compile-time defaults for the wallet server and port. --- tests/portable/asprintf-t.c | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'tests/portable/asprintf-t.c') diff --git a/tests/portable/asprintf-t.c b/tests/portable/asprintf-t.c index a79c7f4..d42e740 100644 --- a/tests/portable/asprintf-t.c +++ b/tests/portable/asprintf-t.c @@ -1,15 +1,21 @@ -/* $Id$ */ -/* asprintf and vasprintf test suite. */ - -/* Written by Russ Allbery - Copyright 2006 Board of Trustees, Leland Stanford Jr. University - See LICENSE for licensing terms. */ +/* $Id$ + * + * asprintf and vasprintf test suite. + * + * Written by Russ Allbery + * Copyright 2006, 2008 Board of Trustees, Leland Stanford Jr. University + * + * See LICENSE for licensing terms. + */ #include -#include +#include #include +int test_asprintf(char **, const char *, ...); +int test_vasprintf(char **, const char *, va_list); + static int vatest(char **result, const char *format, ...) { @@ -17,7 +23,7 @@ vatest(char **result, const char *format, ...) int status; va_start(args, format); - status = vasprintf(result, format, args); + status = test_vasprintf(result, format, args); va_end(args); return status; } @@ -29,11 +35,11 @@ main(void) test_init(12); - ok_int(1, 7, asprintf(&result, "%s", "testing")); + ok_int(1, 7, test_asprintf(&result, "%s", "testing")); ok_string(2, "testing", result); free(result); ok(3, 1); - ok_int(4, 0, asprintf(&result, "%s", "")); + ok_int(4, 0, test_asprintf(&result, "%s", "")); ok_string(5, "", result); free(result); ok(6, 1); -- cgit v1.2.3