diff options
| author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2023-08-26 13:37:47 +0300 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2023-08-28 15:40:13 +0000 |
| commit | d6fb7a2c36f8a6d5fac4754cdfdb5483a03f2892 (patch) | |
| tree | a4511eb054e38337110ae66ca0c0daffd32dbbbf /include | |
| parent | 52922a1509d4623b7efdc8e7091be514cf4cd261 (diff) | |
| download | busybox-w32-d6fb7a2c36f8a6d5fac4754cdfdb5483a03f2892.tar.gz busybox-w32-d6fb7a2c36f8a6d5fac4754cdfdb5483a03f2892.tar.bz2 busybox-w32-d6fb7a2c36f8a6d5fac4754cdfdb5483a03f2892.zip | |
win32: UCRT: avoid I64 printf format warnings
Builds without warnings on:
mingw-msvcrt gcc 13.2 i686/x86-64 (w64devkit).
mingw-ucrt gcc 13.1/13.2 i686/x86-64 (winlibs).
Where previously both the ucrt builds warned about I64.
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h index 61c75791c..e3b17655c 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -288,7 +288,8 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
| 288 | : ((T)1 << (sizeof(T)*8-1)) \ | 288 | : ((T)1 << (sizeof(T)*8-1)) \ |
| 289 | ) | 289 | ) |
| 290 | 290 | ||
| 291 | #if ENABLE_PLATFORM_MINGW32 && \ | 291 | // UCRT supports both "ll" and "I64", but gcc warns on "I64" with UCRT mingw |
| 292 | #if ENABLE_PLATFORM_MINGW32 && !defined(_UCRT) && \ | ||
| 292 | (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO) | 293 | (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO) |
| 293 | #define LL_FMT "I64" | 294 | #define LL_FMT "I64" |
| 294 | #else | 295 | #else |
| @@ -296,7 +297,7 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN | |||
| 296 | #endif | 297 | #endif |
| 297 | 298 | ||
| 298 | #if ENABLE_PLATFORM_MINGW32 && defined(_WIN64) | 299 | #if ENABLE_PLATFORM_MINGW32 && defined(_WIN64) |
| 299 | #define PID_FMT "I64" | 300 | #define PID_FMT LL_FMT |
| 300 | #else | 301 | #else |
| 301 | #define PID_FMT | 302 | #define PID_FMT |
| 302 | #endif | 303 | #endif |
