From 095cf87eb66ca85cae3c32c77b543077902d41e3 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 14 Jun 2015 19:14:48 +0200 Subject: [PATCH] Work around "missing" LLONG_MAX &c in MinGW strict ANSI mode. Definitions of non-standard LLONG_MAX, LLONG_MIN and ULLONG_MAX constants are excluded from MinGW limits.h when compiling in "strict ANSI" mode, so define them ourselves. --- src/propgrid/props.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 3d0506a138..324877e520 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -55,6 +55,14 @@ #include "wx/numformatter.h" #include +#include + +// MinGW in strict ANSI mode doesn't define those in its limits.h. +#if defined(wxNEEDS_STRICT_ANSI_WORKAROUNDS) && !defined(LLONG_MAX) + #define LLONG_MAX 9223372036854775807LL + #define LLONG_MIN (-LLONG_MAX - 1) + #define ULLONG_MAX (2ULL*LLONG_MAX + 1) +#endif // ----------------------------------------------------------------------- // wxStringProperty