123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- #ifndef _STDINT_H_
- #define _STDINT_H_
- typedef signed char int8_t;
- typedef unsigned char uint8_t;
- typedef short int16_t;
- typedef unsigned short uint16_t;
- typedef int int32_t;
- typedef unsigned int uint32_t;
- typedef __int40_t int40_t;
- typedef unsigned __int40_t uint40_t;
- typedef long long int64_t;
- typedef unsigned long long uint64_t;
- typedef int8_t int_least8_t;
- typedef uint8_t uint_least8_t;
- typedef int16_t int_least16_t;
- typedef uint16_t uint_least16_t;
- typedef int32_t int_least32_t;
- typedef uint32_t uint_least32_t;
- typedef int40_t int_least40_t;
- typedef uint40_t uint_least40_t;
- typedef int64_t int_least64_t;
- typedef uint64_t uint_least64_t;
- typedef int32_t int_fast8_t;
- typedef uint32_t uint_fast8_t;
- typedef int32_t int_fast16_t;
- typedef uint32_t uint_fast16_t;
- typedef int32_t int_fast32_t;
- typedef uint32_t uint_fast32_t;
- typedef int40_t int_fast40_t;
- typedef uint40_t uint_fast40_t;
- typedef int64_t int_fast64_t;
- typedef uint64_t uint_fast64_t;
- typedef int intptr_t;
- typedef unsigned int uintptr_t;
- typedef long long intmax_t;
- typedef unsigned long long uintmax_t;
- #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
- #define INT8_MAX 0x7f
- #define INT8_MIN (-INT8_MAX-1)
- #define UINT8_MAX 0xff
- #define INT16_MAX 0x7fff
- #define INT16_MIN (-INT16_MAX-1)
- #define UINT16_MAX 0xffff
- #define INT32_MAX 0x7fffffff
- #define INT32_MIN (-INT32_MAX-1)
- #define UINT32_MAX 0xffffffff
- #define INT40_MAX 0x7fffffffff
- #define INT40_MIN (-INT40_MAX-1)
- #define UINT40_MAX 0xffffffffff
- #define INT64_MAX 0x7fffffffffffffff
- #define INT64_MIN (-INT64_MAX-1)
- #define UINT64_MAX 0xffffffffffffffff
- #define INT_LEAST8_MAX (INT8_MAX)
- #define INT_LEAST8_MIN (INT8_MIN)
- #define UINT_LEAST8_MAX (UINT8_MAX)
- #define INT_LEAST16_MAX (INT16_MAX)
- #define INT_LEAST16_MIN (INT16_MIN)
- #define UINT_LEAST16_MAX (UINT16_MAX)
- #define INT_LEAST32_MAX (INT32_MAX)
- #define INT_LEAST32_MIN (INT32_MIN)
- #define UINT_LEAST32_MAX (UINT32_MAX)
- #define INT_LEAST40_MAX (INT40_MAX)
- #define INT_LEAST40_MIN (INT40_MIN)
- #define UINT_LEAST40_MAX (UINT40_MAX)
- #define INT_LEAST64_MAX (INT64_MAX)
- #define INT_LEAST64_MIN (INT64_MIN)
- #define UINT_LEAST64_MAX (UINT64_MAX)
- #define INT_FAST8_MAX (INT32_MAX)
- #define INT_FAST8_MIN (INT32_MIN)
- #define UINT_FAST8_MAX (UINT32_MAX)
- #define INT_FAST16_MAX (INT32_MAX)
- #define INT_FAST16_MIN (INT32_MIN)
- #define UINT_FAST16_MAX (UINT32_MAX)
- #define INT_FAST32_MAX (INT32_MAX)
- #define INT_FAST32_MIN (INT32_MIN)
- #define UINT_FAST32_MAX (UINT32_MAX)
- #define INT_FAST40_MAX (INT40_MAX)
- #define INT_FAST40_MIN (INT40_MIN)
- #define UINT_FAST40_MAX (UINT40_MAX)
- #define INT_FAST64_MAX (INT64_MAX)
- #define INT_FAST64_MIN (INT64_MIN)
- #define UINT_FAST64_MAX (UINT64_MAX)
- #define INTPTR_MAX (INT32_MAX)
- #define INTPTR_MIN (INT32_MIN)
- #define UINTPTR_MAX (UINT32_MAX)
- #define INTMAX_MIN (INT64_MIN)
- #define INTMAX_MAX (INT64_MAX)
- #define UINTMAX_MAX (UINT64_MAX)
- #define PTRDIFF_MAX (INT32_MAX)
- #define PTRDIFF_MIN (INT32_MIN)
- #define SIG_ATOMIC_MIN (INT32_MIN)
- #define SIG_ATOMIC_MAX (INT32_MAX)
- #define SIZE_MAX (UINT32_MAX)
- #ifndef WCHAR_MAX
- #if !defined(__TI_WCHAR_T_BITS__) || __TI_WCHAR_T_BITS__ == 16
- #define WCHAR_MAX 0xffffu
- #else
- #define WCHAR_MAX 0xffffffffu
- #endif
- #endif
- #ifndef WCHAR_MIN
- #define WCHAR_MIN 0
- #endif
- #define WINT_MIN (INT32_MIN)
- #define WINT_MAX (INT32_MAX)
- #define INT8_C(value) ((int_least8_t)(value))
- #define UINT8_C(value) ((uint_least8_t)(value))
- #define INT16_C(value) ((int_least16_t)(value))
- #define UINT16_C(value) ((uint_least16_t)(value))
- #define INT32_C(value) ((int_least32_t)(value))
- #define UINT32_C(value) ((uint_least32_t)(value))
- #define INT40_C(value) ((int_least40_t)(value))
- #define UINT40_C(value) ((uint_least40_t)(value))
- #define INT64_C(value) ((int_least64_t)(value))
- #define UINT64_C(value) ((uint_least64_t)(value))
- #define INTMAX_C(value) ((intmax_t)(value))
- #define UINTMAX_C(value) ((uintmax_t)(value))
- #endif
- #endif
|