diff options
Diffstat (limited to '3rdparty/json/printbuf.c')
-rwxr-xr-x | 3rdparty/json/printbuf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/3rdparty/json/printbuf.c b/3rdparty/json/printbuf.c index 79bdaf5..3e9e188 100755 --- a/3rdparty/json/printbuf.c +++ b/3rdparty/json/printbuf.c @@ -70,7 +70,7 @@ int printbuf_memappend(struct printbuf *p, char *buf, int size) /* CAW: compliant version of vasprintf */ static int vasprintf(char **buf, const char *fmt, va_list ap) { -#ifndef WIN32 +#if !defined(WIN32) || defined(__GNUC__) static char _T_emptybuffer = '\0'; #endif /* !defined(WIN32) */ int chars; @@ -78,8 +78,9 @@ static int vasprintf(char **buf, const char *fmt, va_list ap) if(!buf) { return -1; } -#ifdef WIN32 - chars = _vscprintf(fmt, ap)+1; +#if defined(WIN32) && !defined(__GNUC__) + chars = vscprintf(fmt, ap)+1; + #else /* !defined(WIN32) */ /* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite our buffer like on some 64bit sun systems.... but hey, its time to move on */ |