X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Finttypes.h;h=61dcb72731f0d81e54ec8e8e2262ba32e2481e22;hb=0ab97350f01b42de0f9fd811ee08653169661859;hp=05d54ba007638c301ec668f8c0d0ec88aff67a62;hpb=216b706548c16e3bc9612c8a2e5eed23f016504c;p=musl diff --git a/include/inttypes.h b/include/inttypes.h index 05d54ba0..61dcb727 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -22,12 +22,12 @@ uintmax_t strtoumax(const char *__restrict, char **__restrict, int); intmax_t wcstoimax(const wchar_t *__restrict, wchar_t **__restrict, int); uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int); -#if !defined __cplusplus || defined __STDC_FORMAT_MACROS - #if UINTPTR_MAX == UINT64_MAX #define __PRI64 "l" +#define __PRIPTR "l" #else #define __PRI64 "ll" +#define __PRIPTR "" #endif #define PRId8 "d" @@ -127,12 +127,12 @@ uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int); #define PRIxMAX __PRI64 "x" #define PRIXMAX __PRI64 "X" -#define PRIdPTR "ld" -#define PRIiPTR "li" -#define PRIoPTR "lo" -#define PRIuPTR "lu" -#define PRIxPTR "lx" -#define PRIXPTR "lX" +#define PRIdPTR __PRIPTR "d" +#define PRIiPTR __PRIPTR "i" +#define PRIoPTR __PRIPTR "o" +#define PRIuPTR __PRIPTR "u" +#define PRIxPTR __PRIPTR "x" +#define PRIXPTR __PRIPTR "X" #define SCNd8 "hhd" #define SCNd16 "hd" @@ -215,13 +215,11 @@ uintmax_t wcstoumax(const wchar_t *__restrict, wchar_t **__restrict, int); #define SCNuMAX __PRI64 "u" #define SCNxMAX __PRI64 "x" -#define SCNdPTR "ld" -#define SCNiPTR "li" -#define SCNoPTR "lo" -#define SCNuPTR "lu" -#define SCNxPTR "lx" - -#endif +#define SCNdPTR __PRIPTR "d" +#define SCNiPTR __PRIPTR "i" +#define SCNoPTR __PRIPTR "o" +#define SCNuPTR __PRIPTR "u" +#define SCNxPTR __PRIPTR "x" #ifdef __cplusplus }