Make int64 constants available under GCC
This commit is contained in:
parent
c43cdf06f8
commit
4dfe5f49ba
1 changed files with 16 additions and 16 deletions
|
@ -43,14 +43,14 @@ typedef u64_t uint64_t;
|
||||||
typedef int8_t int_least8_t;
|
typedef int8_t int_least8_t;
|
||||||
typedef int16_t int_least16_t;
|
typedef int16_t int_least16_t;
|
||||||
typedef int32_t int_least32_t;
|
typedef int32_t int_least32_t;
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
typedef int64_t int_least64_t;
|
typedef int64_t int_least64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef uint8_t uint_least8_t;
|
typedef uint8_t uint_least8_t;
|
||||||
typedef uint16_t uint_least16_t;
|
typedef uint16_t uint_least16_t;
|
||||||
typedef uint32_t uint_least32_t;
|
typedef uint32_t uint_least32_t;
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
typedef uint64_t uint_least64_t;
|
typedef uint64_t uint_least64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ typedef int32_t int_fast8_t;
|
||||||
typedef int32_t int_fast16_t;
|
typedef int32_t int_fast16_t;
|
||||||
#endif
|
#endif
|
||||||
typedef int32_t int_fast32_t;
|
typedef int32_t int_fast32_t;
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
typedef int64_t int_fast64_t;
|
typedef int64_t int_fast64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ typedef uint32_t uint_fast8_t;
|
||||||
typedef uint32_t uint_fast16_t;
|
typedef uint32_t uint_fast16_t;
|
||||||
#endif
|
#endif
|
||||||
typedef uint32_t uint_fast32_t;
|
typedef uint32_t uint_fast32_t;
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
typedef uint64_t uint_fast64_t;
|
typedef uint64_t uint_fast64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -99,49 +99,49 @@ typedef unsigned long uintmax_t;
|
||||||
#define INT8_MIN (-INT8_MAX-1)
|
#define INT8_MIN (-INT8_MAX-1)
|
||||||
#define INT16_MIN (-INT16_MAX-1)
|
#define INT16_MIN (-INT16_MAX-1)
|
||||||
#define INT32_MIN (-INT32_MAX-1)
|
#define INT32_MIN (-INT32_MAX-1)
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT64_MIN (-INT64_MAX-1)
|
#define INT64_MIN (-INT64_MAX-1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT8_MAX 127
|
#define INT8_MAX 127
|
||||||
#define INT16_MAX 32767
|
#define INT16_MAX 32767
|
||||||
#define INT32_MAX 2147483647
|
#define INT32_MAX 2147483647
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT64_MAX 9223372036854775807LL
|
#define INT64_MAX 9223372036854775807LL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UINT8_MAX 255
|
#define UINT8_MAX 255
|
||||||
#define UINT16_MAX 65535
|
#define UINT16_MAX 65535
|
||||||
#define UINT32_MAX 4294967295U
|
#define UINT32_MAX 4294967295U
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define UINT64_MAX 18446744073709551615ULL
|
#define UINT64_MAX 18446744073709551615ULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT_LEAST8_MIN INT8_MIN
|
#define INT_LEAST8_MIN INT8_MIN
|
||||||
#define INT_LEAST16_MIN INT16_MIN
|
#define INT_LEAST16_MIN INT16_MIN
|
||||||
#define INT_LEAST32_MIN INT32_MIN
|
#define INT_LEAST32_MIN INT32_MIN
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT_LEAST64_MIN INT64_MIN
|
#define INT_LEAST64_MIN INT64_MIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT_LEAST8_MAX INT8_MAX
|
#define INT_LEAST8_MAX INT8_MAX
|
||||||
#define INT_LEAST16_MAX INT16_MAX
|
#define INT_LEAST16_MAX INT16_MAX
|
||||||
#define INT_LEAST32_MAX INT32_MAX
|
#define INT_LEAST32_MAX INT32_MAX
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT_LEAST64_MAX INT64_MAX
|
#define INT_LEAST64_MAX INT64_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define UINT_LEAST8_MAX UINT8_MAX
|
#define UINT_LEAST8_MAX UINT8_MAX
|
||||||
#define UINT_LEAST16_MAX UINT16_MAX
|
#define UINT_LEAST16_MAX UINT16_MAX
|
||||||
#define UINT_LEAST32_MAX UINT32_MAX
|
#define UINT_LEAST32_MAX UINT32_MAX
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define UINT_LEAST64_MAX UINT64_MAX
|
#define UINT_LEAST64_MAX UINT64_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define INT_FAST8_MIN (-INT_FAST8_MAX-1)
|
#define INT_FAST8_MIN (-INT_FAST8_MAX-1)
|
||||||
#define INT_FAST16_MIN (-INT_FAST16_MAX-1)
|
#define INT_FAST16_MIN (-INT_FAST16_MAX-1)
|
||||||
#define INT_FAST32_MIN INT32_MIN
|
#define INT_FAST32_MIN INT32_MIN
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT_FAST64_MIN INT64_MIN
|
#define INT_FAST64_MIN INT64_MIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ typedef unsigned long uintmax_t;
|
||||||
#define INT_FAST16_MAX INT32_MAX
|
#define INT_FAST16_MAX INT32_MAX
|
||||||
#endif
|
#endif
|
||||||
#define INT_FAST32_MAX INT32_MAX
|
#define INT_FAST32_MAX INT32_MAX
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT_FAST64_MAX INT64_MAX
|
#define INT_FAST64_MAX INT64_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ typedef unsigned long uintmax_t;
|
||||||
#define UINT_FAST16_MAX UINT32_MAX
|
#define UINT_FAST16_MAX UINT32_MAX
|
||||||
#endif
|
#endif
|
||||||
#define UINT_FAST32_MAX UINT32_MAX
|
#define UINT_FAST32_MAX UINT32_MAX
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define UINT_FAST64_MAX UINT64_MAX
|
#define UINT_FAST64_MAX UINT64_MAX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ typedef unsigned long uintmax_t;
|
||||||
#else
|
#else
|
||||||
#define INT32_C(c) c
|
#define INT32_C(c) c
|
||||||
#endif
|
#endif
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define INT64_C(c) __CONCAT(c,l)
|
#define INT64_C(c) __CONCAT(c,l)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -207,11 +207,11 @@ typedef unsigned long uintmax_t;
|
||||||
#else
|
#else
|
||||||
#define UINT32_C(c) __CONCAT(c,u)
|
#define UINT32_C(c) __CONCAT(c,u)
|
||||||
#endif
|
#endif
|
||||||
#if _WORD_SIZE > 2 && __L64
|
#if defined(__LONG_LONG_SUPPORTED) || (_WORD_SIZE > 2 && __L64)
|
||||||
#define UINT64_C(c) __CONCAT(c,lu)
|
#define UINT64_C(c) __CONCAT(c,lu)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if _WORD_SIZE == 2 || !__L64
|
#if !defined(__LONG_LONG_SUPPORTED) && !(_WORD_SIZE > 2 && __L64)
|
||||||
#define INTMAX_C(c) INT32_C(c)
|
#define INTMAX_C(c) INT32_C(c)
|
||||||
#define UINTMAX_C(c) UINT32_C(c)
|
#define UINTMAX_C(c) UINT32_C(c)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in a new issue