mirror of
https://github.com/TinyCC/tinycc.git
synced 2025-11-16 04:24:45 +00:00
tccpp: Add the define __STDC_HOSTED__ [C99]
Usually defined to 1, but when using "-nostdlib", the value is 0 (required for C99) -- Regards ... Detlef
This commit is contained in:
1
tccpp.c
1
tccpp.c
@@ -3737,6 +3737,7 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm)
|
||||
cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
|
||||
if (!is_asm) {
|
||||
putdef(cs, "__STDC__");
|
||||
cstr_printf(cs, "#define __STDC_HOSTED__ %d\n", s1->nostdlib ? 0 : 1);
|
||||
cstr_printf(cs, "#define __STDC_VERSION__ %dL\n", s1->cversion);
|
||||
cstr_cat(cs,
|
||||
/* load more predefs and __builtins */
|
||||
|
||||
Reference in New Issue
Block a user