AArch64: Fix definitions for STDINT_LIMITS

This patches fixes the definitions for STDINT_LIMITS on __LP64__
systems.

Change-Id: I5eb1664e9ef7c303432a2b041c99cec663816b75
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
This commit is contained in:
Serban Constantinescu 2013-10-08 21:45:02 +01:00 committed by Elliott Hughes
parent 8c39e58b6a
commit debc021491

View File

@ -193,17 +193,33 @@ typedef uint64_t uint_fast64_t;
# define __PRIFAST_RANK ""
# define __PRIPTR_RANK ""
/*
* intptr_t & uintptr_t
*/
#ifdef __LP64__
typedef long intptr_t;
typedef unsigned long uintptr_t;
#ifdef __STDINT_LIMITS
# define INTPTR_MIN INT64_MIN
# define INTPTR_MAX INT64_MAX
# define UINTPTR_MAX UINT64_MAX
# define PTRDIFF_MIN INT64_MIN
# define PTRDIFF_MAX INT64_MAX
#endif
#ifdef __STDINT_MACROS
# define INTPTR_C(c) INT64_C(c)
# define UINTPTR_C(c) UINT64_C(c)
# define PTRDIFF_C(c) INT64_C(c)
#endif
#else
typedef int intptr_t;
typedef unsigned int uintptr_t;
#endif
#ifdef __STDINT_LIMITS
# define INTPTR_MIN INT32_MIN
@ -212,13 +228,15 @@ typedef unsigned int uintptr_t;
# define PTRDIFF_MIN INT32_MIN
# define PTRDIFF_MAX INT32_MAX
#endif
#ifdef __STDINT_MACROS
# define INTPTR_C(c) INT32_C(c)
# define UINTPTR_C(c) UINT32_C(c)
# define PTRDIFF_C(c) INT32_C(c)
#endif
#endif /* __LP64__ */
/*
* intmax_t & uintmax_t
*/