From 078f919296b90ba596ce8adf5f0917a6d3bf591e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Mon, 29 Sep 2008 17:54:35 +0000 Subject: [PATCH] Fix to build on WIN32. --- src/dev/softDev/devSoStdio.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/dev/softDev/devSoStdio.c b/src/dev/softDev/devSoStdio.c index 6a4d9bbae..8b215610a 100644 --- a/src/dev/softDev/devSoStdio.c +++ b/src/dev/softDev/devSoStdio.c @@ -22,6 +22,7 @@ typedef int (*PRINTFFUNC)(const char *fmt, ...); static int stderrPrintf(const char *fmt, ...); +static int logPrintf(const char *fmt, ...); static struct outStream { @@ -30,7 +31,7 @@ static struct outStream { } outStreams[] = { {"stdout", printf}, {"stderr", stderrPrintf}, - {"errlog", errlogPrintf}, + {"errlog", logPrintf}, {NULL, NULL} }; @@ -45,6 +46,17 @@ static int stderrPrintf(const char *fmt, ...) { return retval; } +static int logPrintf(const char *fmt, ...) { + va_list pvar; + int retval; + + va_start(pvar, fmt); + retval = errlogVprintf(fmt, pvar); + va_end (pvar); + + return retval; +} + static long add(dbCommon *pcommon) { stringoutRecord *prec = (stringoutRecord *) pcommon; struct outStream *pstream;