From a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb Mon Sep 17 00:00:00 2001 From: stefan Date: Sun, 23 Apr 2023 17:00:14 -0400 Subject: memory detection --- include/stdint.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/stdint.h') diff --git a/include/stdint.h b/include/stdint.h index c811a87..1eb35a1 100644 --- a/include/stdint.h +++ b/include/stdint.h @@ -14,6 +14,12 @@ typedef long int64_t; typedef unsigned long uintptr_t; +#if __riscv_xlen == 32 +typedef unsigned int uintptr_t; +#elif __riscv_xlen == 64 +typedef unsigned long uintptr_t; +#endif + #define INT16_MIN (-1-0x7fff) #define INT32_MIN (-1-0x7fffffff) #define INT64_MIN (-1-0x7fffffffffffffff) -- cgit v1.2.3