From: Adam Dickmeiss Date: Thu, 3 Jan 2002 10:23:33 +0000 (+0000) Subject: Using _vsnprintf on WIN32. X-Git-Tag: YAZ.1.8.4~7 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=526ab3aa282b1e732814846655eefc199f3f5106 Using _vsnprintf on WIN32. --- 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