From f29daebd904c8a3bc2792301be218fe7c99dfe8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sun, 1 Dec 2024 15:23:53 +0100 Subject: [PATCH] zig.h: Use __thread for slimcc in pre-C11 mode. --- lib/zig.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/zig.h b/lib/zig.h index 344adb7fa2..cac6d08124 100644 --- a/lib/zig.h +++ b/lib/zig.h @@ -31,6 +31,8 @@ typedef char bool; #define zig_gnuc #elif defined(__TINYC__) #define zig_tinyc +#elif defined(__slimcc__) +#define zig_slimcc #endif #define zig_concat(lhs, rhs) lhs##rhs @@ -61,7 +63,7 @@ typedef char bool; #define zig_threadlocal thread_local #elif __STDC_VERSION__ >= 201112L #define zig_threadlocal _Thread_local -#elif defined(__GNUC__) +#elif defined(__GNUC__) || defined(zig_slimcc) #define zig_threadlocal __thread #elif _MSC_VER #define zig_threadlocal __declspec(thread)