History

tccpp: Add the define __STDC_HOSTED__ [C99]

Usually defined to 1, but when using "-nostdlib", the value is 0 (required for C99) -- Regards ... Detlef

Detlef Riekenberg committed 1 year ago

Commit cdebce31 parent f4e01bf1 file · +1 −0Browse files

Unified · Split

tccpp.c+1−0
@@ -3737,6 +3737,7 @@ static void tcc_predefs(TCCState *s1, CString *cs, int is_asm) · 3736 unmodified lines
37373737 cstr_printf(cs, "#define __SIZEOF_LONG__ %d\n", LONG_SIZE);
37383738 if (!is_asm) {
37393739 putdef(cs, "__STDC__");
3740+ cstr_printf(cs, "#define __STDC_HOSTED__ %d\n", s1->nostdlib ? 0 : 1);
37403741 cstr_printf(cs, "#define __STDC_VERSION__ %dL\n", s1->cversion);
37413742 cstr_cat(cs,
37423743 /* load more predefs and __builtins */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t