authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-12-01 15:23:53+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-12-03 11:57:20+01:00
logf29daebd904c8a3bc2792301be218fe7c99dfe8d
tree7153d2b8a620a70dc9569180fd4137fcbd21bf50
parentfa6946f645852363303082447b8087f8213512bb
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

zig.h: Use __thread for slimcc in pre-C11 mode.


1 files changed, 3 insertions(+), 1 deletions(-)

lib/zig.h+3-1
...@@ -31,6 +31,8 @@ typedef char bool;...@@ -31,6 +31,8 @@ typedef char bool;
31#define zig_gnuc31#define zig_gnuc
32#elif defined(__TINYC__)32#elif defined(__TINYC__)
33#define zig_tinyc33#define zig_tinyc
34#elif defined(__slimcc__)
35#define zig_slimcc
34#endif36#endif
3537
36#define zig_concat(lhs, rhs) lhs##rhs38#define zig_concat(lhs, rhs) lhs##rhs
...@@ -61,7 +63,7 @@ typedef char bool;...@@ -61,7 +63,7 @@ typedef char bool;
61#define zig_threadlocal thread_local63#define zig_threadlocal thread_local
62#elif __STDC_VERSION__ >= 201112L64#elif __STDC_VERSION__ >= 201112L
63#define zig_threadlocal _Thread_local65#define zig_threadlocal _Thread_local
64#elif defined(__GNUC__)66#elif defined(__GNUC__) || defined(zig_slimcc)
65#define zig_threadlocal __thread67#define zig_threadlocal __thread
66#elif _MSC_VER68#elif _MSC_VER
67#define zig_threadlocal __declspec(thread)69#define zig_threadlocal __declspec(thread)