From: Adam Dickmeiss Date: Tue, 15 Jun 2004 09:58:13 +0000 (+0000) Subject: Use db_printf instead of dprintf which is a public symbol in many systems X-Git-Tag: YAZ.2.0.23~11 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=f4c4fc8248cfd5ceb834003b237359343aca9b38;p=yaz-moved-to-github.git Use db_printf instead of dprintf which is a public symbol in many systems --- diff --git a/configure.in b/configure.in index 72dbca4..69318a4 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,6 @@ dnl YAZ Toolkit, Index Data 1994-2004 dnl See the file LICENSE for details. -dnl $Id: configure.in,v 1.146 2004-05-26 11:14:29 adam Exp $ +dnl $Id: configure.in,v 1.147 2004-06-15 09:58:13 adam Exp $ AC_INIT(include/yaz/yaz-version.h) AM_INIT_AUTOMAKE(yaz, 2.0.21) AM_MAINTAINER_MODE @@ -153,7 +153,7 @@ if test "$with_iconv" != "no"; then ]) fi dnl ------ various functions -AC_CHECK_FUNCS(vsnprintf gettimeofday poll strerror_r dprintf) +AC_CHECK_FUNCS(vsnprintf gettimeofday poll strerror_r) if test "$ac_cv_func_poll" = "yes"; then AC_CHECK_HEADERS(sys/poll.h) fi diff --git a/util/benchmark.c b/util/benchmark.c index c38eb9b..942742c 100644 --- a/util/benchmark.c +++ b/util/benchmark.c @@ -1,4 +1,4 @@ -/* $Id: benchmark.c,v 1.5 2004-05-19 05:32:47 oleg Exp $ +/* $Id: benchmark.c,v 1.6 2004-06-15 09:58:13 adam Exp $ * Copyright (C) 2003-2004 Index Data Aps * * This file is part of the YAZ toolkit. @@ -39,9 +39,7 @@ struct options { static int test(char *host, int port); -#ifndef HAVE_DPRINTF -static void dprintf(int level, char *fmt, ...); -#endif +static void db_printf(int level, char *fmt, ...); int main(int argc, char **argv) { @@ -85,12 +83,12 @@ int main(int argc, char **argv) port = atoi(argv[optind+1]); for (i = 0; i < options.nconnect; i++) { - dprintf(2, "iteration %d of %d", i+1, options.nconnect); + db_printf(2, "iteration %d of %d", i+1, options.nconnect); ok = test(host, port); if (ok) nok++; } - dprintf(1, "passed %d of %d tests", nok, options.nconnect); + db_printf(1, "passed %d of %d tests", nok, options.nconnect); if (nok < options.nconnect) printf("Failed %d of %d tests\n", options.nconnect-nok, options.nconnect); @@ -116,8 +114,7 @@ static int test(char *host, int port) return 1; } -#ifndef HAVE_DPRINTF -static void dprintf(int level, char *fmt, ...) +static void db_printf(int level, char *fmt, ...) { va_list ap; @@ -130,4 +127,3 @@ static void dprintf(int level, char *fmt, ...) fputc('\n', stderr); va_end(ap); } -#endif