From 526ab3aa282b1e732814846655eefc199f3f5106 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 3 Jan 2002 10:23:33 +0000 Subject: [PATCH] Using _vsnprintf on WIN32. --- util/log.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/util/log.c b/util/log.c index 66d4cc2..6af4b09 100644 --- a/util/log.c +++ b/util/log.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: log.c,v $ - * Revision 1.25 2001-08-23 09:02:46 adam + * Revision 1.26 2002-01-03 10:23:33 adam + * Using _vsnprintf on WIN32. + * + * Revision 1.25 2001/08/23 09:02:46 adam * WIN32 fixes: Socket not re-used for bind. yaz_log logs WIN32 error * message. * @@ -243,11 +246,17 @@ void yaz_log(int level, const char *fmt, ...) level -= mask_names[i].mask; } va_start(ap, fmt); +#ifdef WIN32 + _vsnprintf(buf, sizeof(buf)-1, fmt, ap); +#else +/* !WIN32 */ #if HAVE_VSNPRINTF vsnprintf(buf, sizeof(buf), fmt, ap); #else vsprintf(buf, fmt, ap); #endif +#endif +/* WIN32 */ if (o_level & LOG_ERRNO) { #ifdef WIN32 -- 1.7.10.4