diff options
author | fcolin | 2008-04-11 16:21:04 +0000 |
---|---|---|
committer | fcolin | 2008-04-11 16:21:04 +0000 |
commit | db656ec297cd2bdfdbfdf1ee4dab0085f3198492 (patch) | |
tree | a2b157c7838e2f73590021f7b63462ddf98e196d /src/ivybuffer.c | |
parent | 3152da9d5a99a95ce75fee6c378a3b0711e28bb3 (diff) | |
download | ivy-c-db656ec297cd2bdfdbfdf1ee4dab0085f3198492.zip ivy-c-db656ec297cd2bdfdbfdf1ee4dab0085f3198492.tar.gz ivy-c-db656ec297cd2bdfdbfdf1ee4dab0085f3198492.tar.bz2 ivy-c-db656ec297cd2bdfdbfdf1ee4dab0085f3198492.tar.xz |
Modification pour compilation sous Windows
Diffstat (limited to 'src/ivybuffer.c')
-rw-r--r-- | src/ivybuffer.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 <stdarg.h> #include <string.h> +#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); |