cjit: Some standard headers, builtins
This commit is contained in:
118
packages/cjit/src/includes/stdint.h
Normal file
118
packages/cjit/src/includes/stdint.h
Normal file
@@ -0,0 +1,118 @@
|
||||
#pragma once
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long int64_t;
|
||||
|
||||
typedef int8_t int_fast8_t;
|
||||
typedef int16_t int_fast16_t;
|
||||
typedef int32_t int_fast32_t;
|
||||
typedef int64_t int_fast64_t;
|
||||
|
||||
typedef int8_t int_least8_t;
|
||||
typedef int16_t int_least16_t;
|
||||
typedef int32_t int_least32_t;
|
||||
typedef int64_t int_least64_t;
|
||||
|
||||
typedef int64_t intmax_t;
|
||||
typedef int64_t intptr_t;
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long uint64_t;
|
||||
|
||||
typedef uint8_t uint_fast8_t;
|
||||
typedef uint16_t uint_fast16_t;
|
||||
typedef uint32_t uint_fast32_t;
|
||||
typedef uint64_t uint_fast64_t;
|
||||
|
||||
typedef uint8_t uint_least8_t;
|
||||
typedef uint16_t uint_least16_t;
|
||||
typedef uint32_t uint_least32_t;
|
||||
typedef uint64_t uint_least64_t;
|
||||
|
||||
typedef uint64_t uintmax_t;
|
||||
typedef uint64_t uintptr_t;
|
||||
|
||||
#define INT8_MIN (-0x80)
|
||||
#define INT16_MIN (-0x8000)
|
||||
#define INT32_MIN (-0x80000000)
|
||||
#define INT64_MIN (-0x8000000000000000L)
|
||||
|
||||
#define INT_FAST8_MIN INT8_MIN
|
||||
#define INT_FAST16_MIN INT16_MIN
|
||||
#define INT_FAST32_MIN INT32_MIN
|
||||
#define INT_FAST64_MIN INT64_MIN
|
||||
|
||||
#define INT_LEAST8_MIN INT8_MIN
|
||||
#define INT_LEAST16_MIN INT16_MIN
|
||||
#define INT_LEAST32_MIN INT32_MIN
|
||||
#define INT_LEAST64_MIN INT64_MIN
|
||||
|
||||
#define INTPTR_MIN INT64_MIN
|
||||
#define INTMAX_MIN INT64_MIN
|
||||
|
||||
#define INT8_MAX (0x7F)
|
||||
#define INT16_MAX (0x7FFF)
|
||||
#define INT32_MAX (0x7FFFFFFF)
|
||||
#define INT64_MAX (0x7FFFFFFFFFFFFFFFL)
|
||||
|
||||
#define INT_FAST8_MAX INT8_MAX
|
||||
#define INT_FAST16_MAX INT16_MAX
|
||||
#define INT_FAST32_MAX INT32_MAX
|
||||
#define INT_FAST64_MAX INT64_MAX
|
||||
|
||||
#define INT_LEAST8_MAX INT8_MAX
|
||||
#define INT_LEAST16_MAX INT16_MAX
|
||||
#define INT_LEAST32_MAX INT32_MAX
|
||||
#define INT_LEAST64_MAX INT64_MAX
|
||||
|
||||
#define INTPTR_MAX INT64_MAX
|
||||
#define INTMAX_MAX INT64_MAX
|
||||
|
||||
#define UINT8_MAX (0xFF)
|
||||
#define UINT16_MAX (0xFFFF)
|
||||
#define UINT32_MAX (0xFFFFFFFFU)
|
||||
#define UINT64_MAX (0xFFFFFFFFFFFFFFFFUL)
|
||||
|
||||
#define UINT_FAST8_MAX UINT8_MAX
|
||||
#define UINT_FAST16_MAX UINT16_MAX
|
||||
#define UINT_FAST32_MAX UINT32_MAX
|
||||
#define UINT_FAST64_MAX UINT64_MAX
|
||||
|
||||
#define UINT_LEAST8_MAX UINT8_MAX
|
||||
#define UINT_LEAST16_MAX UINT16_MAX
|
||||
#define UINT_LEAST32_MAX UINT32_MAX
|
||||
#define UINT_LEAST64_MAX UINT64_MAX
|
||||
|
||||
#define UINTPTR_MAX UINT64_MAX
|
||||
#define UINTMAX_MAX UINT64_MAX
|
||||
|
||||
#define INT8_C(value) value
|
||||
#define INT16_C(value) value
|
||||
#define INT32_C(value) value
|
||||
#define INT64_C(value) value ## L
|
||||
|
||||
#define INTMAX_C(value) value ## L
|
||||
|
||||
#define UINT8_C(value) value
|
||||
#define UINT16_C(value) value
|
||||
#define UINT32_C(value) value ## U
|
||||
#define UINT64_C(value) value ## UL
|
||||
|
||||
#define UINTMAX_C(value) value ## UL
|
||||
|
||||
#define PTRDIFF_MIN (-0x8000000000000000L)
|
||||
#define PTRDIFF_MAX (0x7FFFFFFFFFFFFFFFL)
|
||||
|
||||
#define SIZE_MAX (0xFFFFFFFFFFFFFFFFUL)
|
||||
|
||||
#define WINT_MIN (-0x80000000)
|
||||
#define WINT_MAX (0x7FFFFFFF)
|
||||
|
||||
#define WCHAR_MIN (0)
|
||||
#define WCHAR_MAX (0x10FFFF)
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user