Remove reliance on system stdint.h header
This commit is contained in:
23
int.h
Normal file
23
int.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#if defined(__x86_64__) || defined(__aarch64__)
|
||||
#define __WORDSIZE 64
|
||||
#elif defined(__mips__)
|
||||
#define __WORDSIZE 32
|
||||
#endif
|
||||
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long uint64_t;
|
||||
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long int64_t;
|
||||
|
||||
#if __WORDSIZE == 64
|
||||
typedef long intptr_t;
|
||||
typedef unsigned long uintptr_t;
|
||||
#elif __WORDSIZE == 32
|
||||
typedef int intptr_t;
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
Reference in New Issue
Block a user