include/inttypes.h: Provide PRIdMAX and friends using 'j' modifier

Replace definitions in other places.
This commit is contained in:
YAMAMOTO Takashi
2020-11-19 14:09:39 +09:00
committed by Xiang Xiao
parent 123d882027
commit 6ee7fdf874
3 changed files with 15 additions and 34 deletions
+15
View File
@@ -306,6 +306,21 @@
#define SCNxFAST64 SCNx64
#endif
/* intmax_t/uintmax_t */
#define PRIdMAX "jd"
#define PRIiMAX "ji"
#define PRIoMAX "jo"
#define PRIuMAX "ju"
#define PRIxMAX "jx"
#define PRIXMAX "jX"
#define SCNdMAX "jd"
#define SCNiMAX "ji"
#define SCNoMAX "jo"
#define SCNuMAX "ju"
#define SCNxMAX "jx"
/****************************************************************************
* Type Definitions
****************************************************************************/
-26
View File
@@ -147,19 +147,6 @@
# define UINTMAX_MIN UINT64_MIN
# define UINTMAX_MAX UINT64_MAX
# define PRIdMAX PRId64
# define PRIiMAX PRIi64
# define PRIoMAX PRIo64
# define PRIuMAX PRIu64
# define PRIxMAX PRIx64
# define PRIXMAX PRIX64
# define SCNdMAX SCNd64
# define SCNiMAX SCNi64
# define SCNoMAX SCNo64
# define SCNuMAX SCNu64
# define SCNxMAX SCNx64
# define INTMAX_C(x) INT64_C(x)
# define UINTMAX_C(x) UINT64_C(x)
#else
@@ -169,19 +156,6 @@
# define UINTMAX_MIN UINT32_MIN
# define UINTMAX_MAX UINT32_MAX
# define PRIdMAX PRId32
# define PRIiMAX PRIi32
# define PRIoMAX PRIo32
# define PRIuMAX PRIu32
# define PRIxMAX PRIx32
# define PRIXMAX PRIX32
# define SCNdMAX SCNd32
# define SCNiMAX SCNi32
# define SCNoMAX SCNo32
# define SCNuMAX SCNu32
# define SCNxMAX SCNx32
# define INTMAX_C(x) INT32_C(x)
# define UINTMAX_C(x) UINT32_C(x)
#endif