diff config.c @ 795:bce97fc0bb8a

Fix mingw-w64 build and cross-compilation
author =?UTF-8?q?Higor=20Eur=C3=ADpedes?= <heuripedes@gmail.com>
date Sun, 26 Jul 2015 10:59:41 -0700
parents 1b2f8280ba81
children 41f73c76b978
line wrap: on
line diff
--- a/config.c	Sat Jul 25 02:54:00 2015 -0700
+++ b/config.c	Sun Jul 26 10:59:41 2015 -0700
@@ -9,7 +9,13 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef _WIN32
+#ifdef __MINGW64_VERSION_MAJOR
+#define MINGW_W64_VERSION (__MINGW64_VERSION_MAJOR * 1000 + __MINGW64_VERSION_MINOR)
+#else
+#define MINGW_W64_VERSION 0
+#endif
+
+#if defined(_WIN32) && (MINGW_W64_VERSION < 3003)
 char * strtok_r(char * input, char * sep, char ** state)
 {
 	if (input) {