Update MIPS _stdint.h for 64 bit. Initial 64 bit changes for profile.h.
This commit is contained in:
parent
63ba49fd5f
commit
56e6260883
@ -46,15 +46,28 @@
|
||||
#define INT8_C(c) (c)
|
||||
#define INT16_C(c) (c)
|
||||
#define INT32_C(c) (c)
|
||||
#ifdef __mips_n64
|
||||
#define INT64_C(c) (c ## L)
|
||||
#else
|
||||
#define INT64_C(c) (c ## LL)
|
||||
#endif
|
||||
|
||||
#define UINT8_C(c) (c)
|
||||
#define UINT16_C(c) (c)
|
||||
#define UINT32_C(c) (c ## U)
|
||||
#ifdef __mips_n64
|
||||
#define UINT64_C(c) (c ## UL)
|
||||
#else
|
||||
#define UINT64_C(c) (c ## ULL)
|
||||
#endif
|
||||
|
||||
#ifdef __mips_n64
|
||||
#define INTMAX_C(c) (c ## L)
|
||||
#define UINTMAX_C(c) (c ## UL)
|
||||
#else
|
||||
#define INTMAX_C(c) (c ## LL)
|
||||
#define UINTMAX_C(c) (c ## ULL)
|
||||
#endif
|
||||
|
||||
#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
|
||||
|
||||
@ -68,19 +81,19 @@
|
||||
#define INT8_MIN (-0x7f-1)
|
||||
#define INT16_MIN (-0x7fff-1)
|
||||
#define INT32_MIN (-0x7fffffff-1)
|
||||
#define INT64_MIN (-0x7fffffffffffffffLL-1)
|
||||
#define INT64_MIN (-INTMAX_C(0x7fffffffffffffff)-1)
|
||||
|
||||
/* Maximum values of exact-width signed integer types. */
|
||||
#define INT8_MAX 0x7f
|
||||
#define INT16_MAX 0x7fff
|
||||
#define INT32_MAX 0x7fffffff
|
||||
#define INT64_MAX 0x7fffffffffffffffLL
|
||||
#define INT64_MAX INTMAX_C(0x7fffffffffffffff)
|
||||
|
||||
/* Maximum values of exact-width unsigned integer types. */
|
||||
#define UINT8_MAX 0xff
|
||||
#define UINT16_MAX 0xffff
|
||||
#define UINT32_MAX 0xffffffffU
|
||||
#define UINT64_MAX 0xffffffffffffffffULL
|
||||
#define UINT64_MAX UINTMAX_C(0xffffffffffffffff)
|
||||
|
||||
/*
|
||||
* ISO/IEC 9899:1999
|
||||
@ -130,9 +143,15 @@
|
||||
* ISO/IEC 9899:1999
|
||||
* 7.18.2.4 Limits of integer types capable of holding object pointers
|
||||
*/
|
||||
#ifdef __mips_n64
|
||||
#define INTPTR_MIN INT64_MIN
|
||||
#define INTPTR_MAX INT64_MAX
|
||||
#define UINTPTR_MAX UINT64_MAX
|
||||
#else
|
||||
#define INTPTR_MIN INT32_MIN
|
||||
#define INTPTR_MAX INT32_MAX
|
||||
#define UINTPTR_MAX UINT32_MAX
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ISO/IEC 9899:1999
|
||||
@ -147,15 +166,24 @@
|
||||
* 7.18.3 Limits of other integer types
|
||||
*/
|
||||
/* Limits of ptrdiff_t. */
|
||||
#ifdef __mips_n64
|
||||
#define PTRDIFF_MIN INT64_MIN
|
||||
#define PTRDIFF_MAX INT64_MAX
|
||||
#else
|
||||
#define PTRDIFF_MIN INT32_MIN
|
||||
#define PTRDIFF_MAX INT32_MAX
|
||||
#endif
|
||||
|
||||
/* Limits of sig_atomic_t. */
|
||||
#define SIG_ATOMIC_MIN INT32_MIN
|
||||
#define SIG_ATOMIC_MAX INT32_MAX
|
||||
|
||||
/* Limit of size_t. */
|
||||
#ifdef __mips_n64
|
||||
#define SIZE_MAX UINT64_MAX
|
||||
#else
|
||||
#define SIZE_MAX UINT32_MAX
|
||||
#endif
|
||||
|
||||
#ifndef WCHAR_MIN /* Also possibly defined in <wchar.h> */
|
||||
/* Limits of wchar_t. */
|
||||
|
@ -115,7 +115,11 @@ void stopguprof __P((struct gmonparam *p));
|
||||
|
||||
#define FUNCTION_ALIGNMENT 4
|
||||
|
||||
typedef unsigned int uintfptr_t;
|
||||
#ifdef __mips_n64
|
||||
typedef u_long uintfptr_t;
|
||||
#else
|
||||
typedef u_int uintfptr_t;
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@ -123,7 +127,11 @@ typedef unsigned int uintfptr_t;
|
||||
* An unsigned integral type that can hold non-negative difference between
|
||||
* function pointers.
|
||||
*/
|
||||
#ifdef __mips_n64
|
||||
typedef u_long fptrdiff_t;
|
||||
#else
|
||||
typedef u_int fptrdiff_t;
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user