From db656ec297cd2bdfdbfdf1ee4dab0085f3198492 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 11 Apr 2008 16:21:04 +0000 Subject: Modification pour compilation sous Windows --- src/ivybuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/ivybuffer.c') diff --git a/src/ivybuffer.c b/src/ivybuffer.c index 9504bbf..bbb1313 100644 --- a/src/ivybuffer.c +++ b/src/ivybuffer.c @@ -23,6 +23,10 @@ #include #include +#ifdef WIN32 +#define snprintf _snprintf +#endif + #include "param.h" #include "ivybuffer.h" @@ -45,10 +49,12 @@ int make_message(IvyBuffer* buffer, const char *fmt, va_list ap) } while (1) { /* Try to print in the allocated space. */ - va_copy( ap_copy, ap ); + #ifdef WIN32 + ap_copy = ap; n = _vsnprintf (buffer->data + buffer->offset, buffer->size - buffer->offset, fmt, ap_copy); #else + va_copy( ap_copy, ap ); n = vsnprintf (buffer->data + buffer->offset, buffer->size - buffer->offset, fmt, ap_copy); #endif va_end(ap_copy); -- cgit v1.1