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 /procps | |
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 'procps')
-rw-r--r-- | procps/iostat.c | 2 | ||||
-rw-r--r-- | procps/mpstat.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/procps/iostat.c b/procps/iostat.c index c290c594b..2db343f69 100644 --- a/procps/iostat.c +++ b/procps/iostat.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #if 1 | 29 | #if 1 |
30 | typedef unsigned long long cputime_t; | 30 | typedef unsigned long long cputime_t; |
31 | typedef long long icputime_t; | 31 | typedef long long icputime_t; |
32 | # define FMT_DATA "ll" | 32 | # define FMT_DATA LL_FMT |
33 | # define CPUTIME_MAX (~0ULL) | 33 | # define CPUTIME_MAX (~0ULL) |
34 | #else | 34 | #else |
35 | typedef unsigned long cputime_t; | 35 | typedef unsigned long cputime_t; |
diff --git a/procps/mpstat.c b/procps/mpstat.c index 6028903fa..8a79fd8ba 100644 --- a/procps/mpstat.c +++ b/procps/mpstat.c | |||
@@ -49,7 +49,7 @@ | |||
49 | #if 1 | 49 | #if 1 |
50 | typedef unsigned long long data_t; | 50 | typedef unsigned long long data_t; |
51 | typedef long long idata_t; | 51 | typedef long long idata_t; |
52 | #define FMT_DATA "ll" | 52 | #define FMT_DATA LL_FMT |
53 | #define DATA_MAX ULLONG_MAX | 53 | #define DATA_MAX ULLONG_MAX |
54 | #else | 54 | #else |
55 | typedef unsigned long data_t; | 55 | typedef unsigned long data_t; |