X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Flog.c;h=6af4b09d42715117e35c25545d5503ba4bbe2681;hb=3bb2e157affd19490974257a252472716d7858b3;hp=66d4cc29553625c7e3655009fcffe26bcd902bf8;hpb=115041d41421c262942dd2d97d3828a1e3281ad1;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