Use "standard" printf prefixes instead of MSVC ones in inttypes.h
We don't use MSVC's printf, but ours, and it doesn't support the I32 and I64 prefixes.
This commit is contained in:
parent
79c4bca7d1
commit
1d01206bbc
@ -53,6 +53,14 @@ typedef struct {
|
|||||||
|
|
||||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
|
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198
|
||||||
|
|
||||||
|
#ifdef _WIN64
|
||||||
|
# define __PRI64_PREFIX "l"
|
||||||
|
# define __PRIPTR_PREFIX "l"
|
||||||
|
#else
|
||||||
|
# define __PRI64_PREFIX "ll"
|
||||||
|
# define __PRIPTR_PREFIX
|
||||||
|
#endif
|
||||||
|
|
||||||
// The fprintf macros for signed integers are:
|
// The fprintf macros for signed integers are:
|
||||||
#define PRId8 "d"
|
#define PRId8 "d"
|
||||||
#define PRIi8 "i"
|
#define PRIi8 "i"
|
||||||
@ -68,25 +76,25 @@ typedef struct {
|
|||||||
#define PRIdFAST16 "hd"
|
#define PRIdFAST16 "hd"
|
||||||
#define PRIiFAST16 "hi"
|
#define PRIiFAST16 "hi"
|
||||||
|
|
||||||
#define PRId32 "I32d"
|
#define PRId32 "d"
|
||||||
#define PRIi32 "I32i"
|
#define PRIi32 "i"
|
||||||
#define PRIdLEAST32 "I32d"
|
#define PRIdLEAST32 "d"
|
||||||
#define PRIiLEAST32 "I32i"
|
#define PRIiLEAST32 "i"
|
||||||
#define PRIdFAST32 "I32d"
|
#define PRIdFAST32 "d"
|
||||||
#define PRIiFAST32 "I32i"
|
#define PRIiFAST32 "i"
|
||||||
|
|
||||||
#define PRId64 "I64d"
|
#define PRId64 __PRI64_PREFIX "d"
|
||||||
#define PRIi64 "I64i"
|
#define PRIi64 __PRI64_PREFIX "i"
|
||||||
#define PRIdLEAST64 "I64d"
|
#define PRIdLEAST64 __PRI64_PREFIX "d"
|
||||||
#define PRIiLEAST64 "I64i"
|
#define PRIiLEAST64 __PRI64_PREFIX "i"
|
||||||
#define PRIdFAST64 "I64d"
|
#define PRIdFAST64 __PRI64_PREFIX "d"
|
||||||
#define PRIiFAST64 "I64i"
|
#define PRIiFAST64 __PRI64_PREFIX "i"
|
||||||
|
|
||||||
#define PRIdMAX "I64d"
|
#define PRIdMAX __PRI64_PREFIX "d"
|
||||||
#define PRIiMAX "I64i"
|
#define PRIiMAX __PRI64_PREFIX "i"
|
||||||
|
|
||||||
#define PRIdPTR "Id"
|
#define PRIdPTR __PRIPTR_PREFIX "d"
|
||||||
#define PRIiPTR "Ii"
|
#define PRIiPTR __PRIPTR_PREFIX "i"
|
||||||
|
|
||||||
// The fprintf macros for unsigned integers are:
|
// The fprintf macros for unsigned integers are:
|
||||||
#define PRIo8 "o"
|
#define PRIo8 "o"
|
||||||
@ -115,41 +123,41 @@ typedef struct {
|
|||||||
#define PRIxFAST16 "hx"
|
#define PRIxFAST16 "hx"
|
||||||
#define PRIXFAST16 "hX"
|
#define PRIXFAST16 "hX"
|
||||||
|
|
||||||
#define PRIo32 "I32o"
|
#define PRIo32 "o"
|
||||||
#define PRIu32 "I32u"
|
#define PRIu32 "u"
|
||||||
#define PRIx32 "I32x"
|
#define PRIx32 "x"
|
||||||
#define PRIX32 "I32X"
|
#define PRIX32 "X"
|
||||||
#define PRIoLEAST32 "I32o"
|
#define PRIoLEAST32 "o"
|
||||||
#define PRIuLEAST32 "I32u"
|
#define PRIuLEAST32 "u"
|
||||||
#define PRIxLEAST32 "I32x"
|
#define PRIxLEAST32 "x"
|
||||||
#define PRIXLEAST32 "I32X"
|
#define PRIXLEAST32 "X"
|
||||||
#define PRIoFAST32 "I32o"
|
#define PRIoFAST32 "o"
|
||||||
#define PRIuFAST32 "I32u"
|
#define PRIuFAST32 "u"
|
||||||
#define PRIxFAST32 "I32x"
|
#define PRIxFAST32 "x"
|
||||||
#define PRIXFAST32 "I32X"
|
#define PRIXFAST32 "X"
|
||||||
|
|
||||||
#define PRIo64 "I64o"
|
#define PRIo64 __PRI64_PREFIX "o"
|
||||||
#define PRIu64 "I64u"
|
#define PRIu64 __PRI64_PREFIX "u"
|
||||||
#define PRIx64 "I64x"
|
#define PRIx64 __PRI64_PREFIX "x"
|
||||||
#define PRIX64 "I64X"
|
#define PRIX64 __PRI64_PREFIX "X"
|
||||||
#define PRIoLEAST64 "I64o"
|
#define PRIoLEAST64 __PRI64_PREFIX "o"
|
||||||
#define PRIuLEAST64 "I64u"
|
#define PRIuLEAST64 __PRI64_PREFIX "u"
|
||||||
#define PRIxLEAST64 "I64x"
|
#define PRIxLEAST64 __PRI64_PREFIX "x"
|
||||||
#define PRIXLEAST64 "I64X"
|
#define PRIXLEAST64 __PRI64_PREFIX "X"
|
||||||
#define PRIoFAST64 "I64o"
|
#define PRIoFAST64 __PRI64_PREFIX "o"
|
||||||
#define PRIuFAST64 "I64u"
|
#define PRIuFAST64 __PRI64_PREFIX "u"
|
||||||
#define PRIxFAST64 "I64x"
|
#define PRIxFAST64 __PRI64_PREFIX "x"
|
||||||
#define PRIXFAST64 "I64X"
|
#define PRIXFAST64 __PRI64_PREFIX "X"
|
||||||
|
|
||||||
#define PRIoMAX "I64o"
|
#define PRIoMAX __PRI64_PREFIX "o"
|
||||||
#define PRIuMAX "I64u"
|
#define PRIuMAX __PRI64_PREFIX "u"
|
||||||
#define PRIxMAX "I64x"
|
#define PRIxMAX __PRI64_PREFIX "x"
|
||||||
#define PRIXMAX "I64X"
|
#define PRIXMAX __PRI64_PREFIX "X"
|
||||||
|
|
||||||
#define PRIoPTR "Io"
|
#define PRIoPTR __PRIPTR_PREFIX "o"
|
||||||
#define PRIuPTR "Iu"
|
#define PRIuPTR __PRIPTR_PREFIX "u"
|
||||||
#define PRIxPTR "Ix"
|
#define PRIxPTR __PRIPTR_PREFIX "x"
|
||||||
#define PRIXPTR "IX"
|
#define PRIXPTR __PRIPTR_PREFIX "X"
|
||||||
|
|
||||||
// The fscanf macros for signed integers are:
|
// The fscanf macros for signed integers are:
|
||||||
#define SCNd8 "d"
|
#define SCNd8 "d"
|
||||||
|
Loading…
Reference in New Issue
Block a user