summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorten Sorvig <msorvig@trolltech.com>2009-10-06 10:06:01 +0200
committerMorten Sorvig <msorvig@trolltech.com>2009-10-06 10:06:01 +0200
commit4c709e1290a77739dc94c27475cd4e7cffcde739 (patch)
tree3b35ad97f6f0e1124f9d3eb9b6be7d4208444518
parent2ea05c0d553217c9364129a51b97945e06578660 (diff)
compile on mingw. (merge request #1572)HEADmaster
-rwxr-xr-x3rdparty/json/config.h6
-rwxr-xr-x3rdparty/json/json_tokener.c4
-rwxr-xr-x3rdparty/json/printbuf.c7
-rw-r--r--src/webclient.h2
4 files changed, 10 insertions, 9 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 */
diff --git a/src/webclient.h b/src/webclient.h
index 69a33fa..a7a8c07 100644
--- a/src/webclient.h
+++ b/src/webclient.h
@@ -62,6 +62,6 @@ private:
-#endif QT_WEBCLIENT_H
+#endif //QT_WEBCLIENT_H