* libc/include/inttypes.h: Redefine pointer type macros.

This commit is contained in:
Corinna Vinschen 2012-02-07 16:42:20 +00:00
parent 9ccb2ee84a
commit dd9ee39045
2 changed files with 12 additions and 8 deletions

View File

@ -1,3 +1,7 @@
2012-02-07 Corinna Vinschen <vinschen@redhat.com>
* libc/include/inttypes.h: Redefine pointer type macros.
2012-01-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> 2012-01-13 Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
* libc/stdio/sprintf.c: Document 'm' conversion specifier. * libc/stdio/sprintf.c: Document 'm' conversion specifier.

View File

@ -242,15 +242,15 @@
#define SCNxMAX __SCNMAX(x) #define SCNxMAX __SCNMAX(x)
/* ptr types */ /* ptr types */
#if __have_long64 #if PTRDIFF_MAX <= __STDINT_EXP(INT_MAX)
#define __PRIPTR(x) __STRINGIFY(l##x) # define __PRIPTR(x) __STRINGIFY(x)
#define __SCNPTR(x) __STRINGIFY(l##x) # define __SCNPTR(x) __STRINGIFY(x)
#elif __have_longlong64 #elif PTRDIFF_MAX <= __STDINT_EXP(LONG_MAX) || !defined(__have_longlong64)
#define __PRIPTR(x) __STRINGIFY(ll##x) # define __PRIPTR(x) __STRINGIFY(l##x)
#define __SCNPTR(x) __STRINGIFY(ll##x) # define __SCNPTR(x) __STRINGIFY(l##x)
#else #else
#define __PRIPTR(x) __STRINGIFY(x) # define __PRIPTR(x) __STRINGIFY(ll##x)
#define __SCNPTR(x) __STRINGIFY(x) # define __SCNPTR(x) __STRINGIFY(ll##x)
#endif #endif
#define PRIdPTR __PRIPTR(d) #define PRIdPTR __PRIPTR(d)