1
0
Fork 0

Use PRIuPTR and define it for Windows GCC 64-bit

This commit is contained in:
krcroft 2019-11-29 17:28:51 -08:00 committed by Patryk Obara
parent 7d21bb1408
commit b55b43f543
8 changed files with 295 additions and 270 deletions

View file

@ -22,6 +22,19 @@
#include <cinttypes>
#include <cstdint>
/* Work around this bug in /mingw64/x86_64-w64-mingw64/include/inttypes.h:
* MS runtime does not yet understand C9x standard "ll"
* length specifier. It appears to treat "ll" as "l".
* The non-standard I64 length specifier understood by MS
* runtime functions, so for now we use that.
*/
#if defined(__MINGW64__) && !defined(__clang__)
#ifdef PRIuPTR
#undef PRIuPTR
#endif
#define PRIuPTR "I64u"
#endif
using Bit8u = uint8_t;
using Bit16u = uint16_t;
using Bit32u = uint32_t;