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 --- coreutils/factor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coreutils/factor.c') diff --git a/coreutils/factor.c b/coreutils/factor.c index 205cdc053..8782d3d1e 100644 --- a/coreutils/factor.c +++ b/coreutils/factor.c @@ -161,7 +161,7 @@ static NOINLINE void factorize(wide_t N) } end: if (N > 1) - printf(" %llu", N); + printf(" %"LL_FMT"u", N); bb_putchar('\n'); } @@ -175,7 +175,7 @@ static void factorize_numstr(const char *numstr) N = bb_strtoull(numstr, NULL, 10); if (errno) bb_show_usage(); - printf("%llu:", N); + printf("%"LL_FMT"u:", N); factorize(N); } -- cgit v1.2.3-55-g6feb