summaryrefslogtreecommitdiff
path: root/include/stdint.h
diff options
context:
space:
mode:
authorstefan <stefan@s00.xyz>2023-04-23 17:00:14 -0400
committerstefan <stefan@s00.xyz>2023-04-23 17:00:14 -0400
commita3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb (patch)
treebad1c1d9026e7de550a1e69863acdf9a8213b2b7 /include/stdint.h
parent386ad4f82955d389ae347bc50f7efca5edb9d9a8 (diff)
downloadsv-a3c174ee4c08d1d5e7a89ce187f52e3c0807a7eb.tar.gz
memory detection
Diffstat (limited to 'include/stdint.h')
-rw-r--r--include/stdint.h6
1 files changed, 6 insertions, 0 deletions
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)