From 18afed0f98d020608c65293ecb9246dab6c58db3 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 1 Feb 2017 22:29:58 +0100 Subject: Use %I64* formats with MinGW instead of %ll* formats The MSVC runtime uses the format specified %I64 for 64-bit data types; It does not understand e.g. %llu for unsigned long longs. However, mingw-w64 provides a compatibility mode in its runtime wrapper which can be activated by defining the constant __USE_MINGW_ANSI_STDIO=1 in which case we must refrain from overriding the %ll* formats. This fixes quite a couple of compile warnings when building with the mingw-w64 compiler. Signed-off-by: Johannes Schindelin --- shell/math.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/math.h b/shell/math.h index 32e1ffe35..90eb49144 100644 --- a/shell/math.h +++ b/shell/math.h @@ -65,7 +65,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN #if ENABLE_FEATURE_SH_MATH_64 typedef long long arith_t; -#define ARITH_FMT "%lld" +#define ARITH_FMT "%"LL_FMT"d" #define strto_arith_t strtoull #else typedef long arith_t; -- cgit v1.2.3-55-g6feb