diff options
Diffstat (limited to '3rdparty')
-rwxr-xr-x | 3rdparty/json/config.h | 6 | ||||
-rwxr-xr-x | 3rdparty/json/json_tokener.c | 4 | ||||
-rwxr-xr-x | 3rdparty/json/printbuf.c | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/3rdparty/json/config.h b/3rdparty/json/config.h index ca13250..f8375a6 100755 --- a/3rdparty/json/config.h +++ b/3rdparty/json/config.h @@ -1,6 +1,8 @@ #ifdef _MSC_VER #define WIN32 -#include "config.h.win32" +#endif +#ifdef WIN32 + #include "config.h.win32" #else -#include "config.h.unix" + #include "config.h.unix" #endif diff --git a/3rdparty/json/json_tokener.c b/3rdparty/json/json_tokener.c index ada0f9b..bc0e380 100755 --- a/3rdparty/json/json_tokener.c +++ b/3rdparty/json/json_tokener.c @@ -23,15 +23,13 @@ #include "json_object.h" #include "json_tokener.h" - -#if !HAVE_STRNCASECMP && defined(_MSC_VER) +#if HAVE_STRNCASECMP && defined(_MSC_VER) && !defined(__GNUC__) /* MSC has the version as _strnicmp */ # define strncasecmp _strnicmp #elif !HAVE_STRNCASECMP # error You do not have strncasecmp on your system. #endif /* HAVE_STRNCASECMP */ - static const char* json_null_str = "null"; static const char* json_true_str = "true"; static const char* json_false_str = "false"; 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 */ |