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 /coreutils/ls.c | |
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 'coreutils/ls.c')
-rw-r--r-- | coreutils/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 6780057da..61b4409a7 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
@@ -496,7 +496,7 @@ static NOINLINE unsigned display_single(const struct dnode *dn) | |||
496 | lpath = xmalloc_readlink_or_warn(dn->fullname); | 496 | lpath = xmalloc_readlink_or_warn(dn->fullname); |
497 | 497 | ||
498 | if (opt & OPT_i) /* show inode# */ | 498 | if (opt & OPT_i) /* show inode# */ |
499 | column += printf("%7llu ", (long long) dn->dn_ino); | 499 | column += printf("%7"LL_FMT"u ", (long long) dn->dn_ino); |
500 | //TODO: -h should affect -s too: | 500 | //TODO: -h should affect -s too: |
501 | if (opt & OPT_s) /* show allocated blocks */ | 501 | if (opt & OPT_s) /* show allocated blocks */ |
502 | column += printf("%6"OFF_FMT"u ", (off_t) (dn->dn_blocks >> 1)); | 502 | column += printf("%6"OFF_FMT"u ", (off_t) (dn->dn_blocks >> 1)); |