Improve check for int32_t being long or int

* libc/include/sys/config.h: Move evaluation of _UINTPTR_EQ_ULONG and
        _UINTPTR_EQ_ULONGLONG from here...
        * libc/include/sys/_intsup.h: ...to here.  Rename to _INTPTR_EQ_LONG
        and _INTPTR_EQ_LONGLONG to refer to signed base type.  Add test for
        base type of int32_t and set _INT32_EQ_LONG accordingly.
        * libc/include/stdint.h: Change checks for __have_long32 to checks
        for _INT32_EQ_LONG.
        * libc/include/inttypes.h: Ditto.  Accommodate aforementioned name
        change.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2015-04-29 13:06:45 +02:00
parent 49c051c133
commit 6109eadff5
5 changed files with 53 additions and 32 deletions

View File

@ -142,7 +142,7 @@
#define SCNxFAST16 __SCN16(x)
/* 32-bit types */
#if __have_long32
#if defined (_INT32_EQ_LONG)
#define __PRI32(x) __STRINGIFY(l##x)
#define __SCN32(x) __STRINGIFY(l##x)
#else
@ -272,10 +272,10 @@
#define SCNxMAX __SCNMAX(x)
/* ptr types */
#if defined(_UINTPTR_EQ_ULONGLONG)
#if defined (_INTPTR_EQ_LONGLONG)
# define __PRIPTR(x) __STRINGIFY(ll##x)
# define __SCNPTR(x) __STRINGIFY(ll##x)
#elif defined(_UINTPTR_EQ_ULONG)
#elif defined (_INTPTR_EQ_LONG)
# define __PRIPTR(x) __STRINGIFY(l##x)
# define __SCNPTR(x) __STRINGIFY(l##x)
#else