diff options
author | Morten Sorvig <[email protected]> | 2009-10-06 10:06:01 +0200 |
---|---|---|
committer | Morten Sorvig <[email protected]> | 2009-10-06 10:06:01 +0200 |
commit | 4c709e1290a77739dc94c27475cd4e7cffcde739 (patch) | |
tree | 3b35ad97f6f0e1124f9d3eb9b6be7d4208444518 /3rdparty/json/printbuf.c | |
parent | 2ea05c0d553217c9364129a51b97945e06578660 (diff) |
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 */ |