summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornir.bar <nir.bar@panel-sw.com>2015-12-03 13:19:52 +0200
committernir.bar <nir.bar@panel-sw.com>2015-12-03 13:19:52 +0200
commit3dadebf10e578468b04f00236b0af5961c4c58a0 (patch)
tree6e545598f60561db6f851fcfe05e4397f68ea02c /src
parent0d111976e1e5fa297e8811922b2cd4995d5fbb99 (diff)
parent2cf599b310efffd5dace66cf6e8b9b4df396df50 (diff)
Merge branch 'master' of github.com:nirbar/pugixml
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 217e001..a53ff4d 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -109,6 +109,13 @@ using std::memmove;
using std::memset;
#endif
+// Some MinGW versions have headers that erroneously omit LLONG_MIN/LLONG_MAX/ULLONG_MAX definitions in strict ANSI mode
+#if defined(PUGIXML_HAS_LONG_LONG) && defined(__MINGW32__) && defined(__STRICT_ANSI__) && !defined(LLONG_MAX) && !defined(LLONG_MIN) && !defined(ULLONG_MAX)
+# define LLONG_MAX 9223372036854775807LL
+# define LLONG_MIN (-LLONG_MAX-1)
+# define ULLONG_MAX (2ULL*LLONG_MAX+1)
+#endif
+
// In some environments MSVC is a compiler but the CRT lacks certain MSVC-specific features
#if defined(_MSC_VER) && !defined(__S3E__)
# define PUGI__MSVC_CRT_VERSION _MSC_VER