From 571868c4f74d2a86db4f41e1d29b27159145f262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kn=C3=A1pek?= Date: Fri, 15 Aug 2025 04:41:24 +0200 Subject: [PATCH] Fix for MSVC's usage of __declspec(align(#)). --- tccpp.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tccpp.c b/tccpp.c index 092a4452..5556757e 100644 --- a/tccpp.c +++ b/tccpp.c @@ -117,7 +117,15 @@ ST_FUNC void expect(const char *msg) #define USE_TAL -#define POINTER_SIZE sizeof(void *) +#ifdef _MSC_VER +# if defined _M_AMD64 || defined _M_ARM64 || defined _M_ARM64EC || defined _M_IA64 || defined _M_X64 +# define POINTER_SIZE 8 +# else +# define POINTER_SIZE 4 +# endif +#else +# define POINTER_SIZE sizeof(void *) +#endif #ifndef USE_TAL #define tal_free(al, p) tcc_free(p)