You can rebuild tcc after changing tccdefs.h with the matching type

Attached is a patch, but I'm not sure whether it's correct.

on musl aarch64, both wchar_t and wint_t are unsigned int

>From 736ce206b8cd4e6c0d5e524c02cc674d05c28242 Mon Sep 17 00:00:00 2001
From: noneofyourbusiness <noneofyourbusin...@danwin1210.de>
Date: Sat, 12 Aug 2023 15:50:43 +0200
Subject: [PATCH] tccdefs.h: define WCHAR, WINT as unsigned for
 aarch64-linux-musl

not sure if this is correct, needs review

Signed-off-by: noneofyourbusiness <noneofyourbusin...@danwin1210.de>
---
 include/tccdefs.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/tccdefs.h b/include/tccdefs.h
index f6c25a4..560a9ae 100644
--- a/include/tccdefs.h
+++ b/include/tccdefs.h
@@ -63,6 +63,9 @@
 #elif defined __linux__
     #define __WCHAR_TYPE__ int
     #define __WINT_TYPE__ unsigned int
+#elif defined __linux__ && defined TCC_MUSL && defined __aarch64__
+    #define __WCHAR_TYPE__ unsigned int
+    #define __WINT_TYPE__ unsigned int
 #else
     #define __WCHAR_TYPE__ int
     #define __WINT_TYPE__ int
-- 
2.41.0

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to