...
This commit is contained in:
50
src/stdlib/stdint.h
Normal file
50
src/stdlib/stdint.h
Normal file
@@ -0,0 +1,50 @@
|
||||
#pragma once
|
||||
|
||||
typedef signed char int8_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef signed short int16_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef signed int int32_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef signed long long int64_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef int8_t i8;
|
||||
typedef uint16_t u16;
|
||||
typedef int16_t i16;
|
||||
typedef uint32_t u32;
|
||||
typedef int32_t i32;
|
||||
typedef uint64_t u64;
|
||||
typedef int64_t i64;
|
||||
|
||||
#define INT8_MIN (-128)
|
||||
#define INT8_MAX 127
|
||||
#define UINT8_MAX 0xff
|
||||
|
||||
#define INT16_MIN (-32768)
|
||||
#define INT16_MAX 32767
|
||||
#define UINT16_MAX 0xffff
|
||||
|
||||
#define INT32_MIN (-2147483647 - 1)
|
||||
#define INT32_MAX 2147483647
|
||||
#define UINT32_MAX 0xffffffffU
|
||||
|
||||
#define INT64_MIN (-9223372036854775807LL - 1)
|
||||
#define INT64_MAX 9223372036854775807LL
|
||||
#define UINT64_MAX 0xffffffffffffffffULL
|
||||
|
||||
#define INT8_C(x) x
|
||||
#define UINT8_C(x) x##U
|
||||
|
||||
#define INT16_C(x) x
|
||||
#define UINT16_C(x) x##U
|
||||
|
||||
#define INT32_C(x) x
|
||||
#define UINT32_C(x) x##U
|
||||
|
||||
#define INT64_C(x) x##LL
|
||||
#define UINT64_C(x) x##ULL
|
||||
|
||||
#define INTMAX_C(x) x##LL
|
||||
#define UINTMAX_C(x) x##ULL
|
||||
Reference in New Issue
Block a user