X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=util%2Flog.c;h=6af4b09d42715117e35c25545d5503ba4bbe2681;hb=526ab3aa282b1e732814846655eefc199f3f5106;hp=66d4cc29553625c7e3655009fcffe26bcd902bf8;hpb=3599bbc013ec757862d8a2d6e62aa6a432ba4514;p=yaz-moved-to-github.git 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