diff options
author | Johannes Schindelin <johannes.schindelin@gmx.de> | 2017-02-01 22:29:58 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-07-18 09:51:30 +0100 |
commit | 18afed0f98d020608c65293ecb9246dab6c58db3 (patch) | |
tree | 376aa1289f3f0e934e8381507c337d68e1e4b89a /editors | |
parent | d416bdac2fff5eed7cfa70499ff61c8b8a9ca7ce (diff) | |
download | busybox-w32-18afed0f98d020608c65293ecb9246dab6c58db3.tar.gz busybox-w32-18afed0f98d020608c65293ecb9246dab6c58db3.tar.bz2 busybox-w32-18afed0f98d020608c65293ecb9246dab6c58db3.zip |
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 <johannes.schindelin@gmx.de>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/awk.c b/editors/awk.c index 84ba125cd..e8e2c96f8 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2078,7 +2078,7 @@ static int fmt_num(char *b, int size, const char *format, double n, int int_as_i | |||
2078 | const char *s = format; | 2078 | const char *s = format; |
2079 | 2079 | ||
2080 | if (int_as_int && n == (long long)n) { | 2080 | if (int_as_int && n == (long long)n) { |
2081 | r = snprintf(b, size, "%lld", (long long)n); | 2081 | r = snprintf(b, size, "%"LL_FMT"d", (long long)n); |
2082 | } else { | 2082 | } else { |
2083 | do { c = *s; } while (c && *++s); | 2083 | do { c = *s; } while (c && *++s); |
2084 | if (strchr("diouxX", c)) { | 2084 | if (strchr("diouxX", c)) { |