1
0
Fork 0
forked from nuttx/nuttx-update

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

View file

@ -76,8 +76,6 @@
# define PRIu32 "u"
# define PRIu64 _PRI64PREFIX "u"
# define PRIuMAX "llu"
# define PRIx8 "x"
# define PRIx16 "x"
# define PRIx32 "x"
@ -93,22 +91,16 @@
# define SCNd32 "d"
# define SCNd64 _SCN64PREFIX "d"
# define SCNdMAX "lld"
# define SCNi8 "hhi"
# define SCNi16 "hi"
# define SCNi32 "i"
# define SCNi64 _SCN64PREFIX "i"
# define SCNiMAX "lli"
# define SCNo8 "hho"
# define SCNo16 "ho"
# define SCNo32 "o"
# define SCNo64 _SCN64PREFIX "o"
# define SCNoMAX "llo"
# define SCNu8 "hhu"
# define SCNu16 "hu"
# define SCNu32 "u"

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
****************************************************************************/

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