summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/mongoose/mongoose.c
diff options
context:
space:
mode:
author Cowering <cowering@users.noreply.github.com>2015-05-28 17:03:36 -0500
committer Cowering <cowering@users.noreply.github.com>2015-05-28 17:03:36 -0500
commit4332164659ec242c69d3d314a523917955fb9d1c (patch)
tree225c1627dec06a16feddcfe2cb48a00f266773e6 /3rdparty/mongoose/mongoose.c
parente2f8eed5b663ff0902674fca16f2d2daae269bd1 (diff)
compile fixes for GCC5.1.1 win64 and CPP11 mode.. requested by mingw team to test LTO fixes. please add #ifdefs if 64 bit printf does not work for you
Diffstat (limited to '3rdparty/mongoose/mongoose.c')
-rw-r--r--3rdparty/mongoose/mongoose.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/3rdparty/mongoose/mongoose.c b/3rdparty/mongoose/mongoose.c
index 5a7f74ea942..a12ccdac5d7 100644
--- a/3rdparty/mongoose/mongoose.c
+++ b/3rdparty/mongoose/mongoose.c
@@ -1318,7 +1318,12 @@ void ns_mgr_free(struct ns_mgr *s) {
#define STR(x) STRX(x)
#define __func__ __FILE__ ":" STR(__LINE__)
#endif
+// find proper defines for this for VS and other compilers
+#if defined(__USE_MINGW_ANSI_STDIO)
+#define INT64_FMT "lld"
+#else
#define INT64_FMT "I64d"
+#endif
#define flockfile(x) ((void) (x))
#define funlockfile(x) ((void) (x))
typedef struct _stati64 file_stat_t;
@@ -2477,7 +2482,7 @@ int mg_url_decode(const char *src, size_t src_len, char *dst,
static int is_valid_http_method(const char *s) {
return !strcmp(s, "GET") || !strcmp(s, "POST") || !strcmp(s, "HEAD") ||
!strcmp(s, "CONNECT") || !strcmp(s, "PUT") || !strcmp(s, "DELETE") ||
- !strcmp(s, "OPTIONS") || !strcmp(s, "PROPFIND") || !strcmp(s, "MKCOL") ||
+ !strcmp(s, "OPTIONS") || !strcmp(s, "PROPFIND") || !strcmp(s, "MKCOL") ||
!strcmp(s, "PATCH");
}