Remove reliance on system stdint.h header

This commit is contained in:
2025-04-14 17:47:58 -04:00
parent 6902b49be2
commit a8594606c3
6 changed files with 28 additions and 5 deletions

23
int.h Normal file
View 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