History

Add _ISOCxx_SOURCE glibc compatible macros.

Christian Jullien committed 6 years ago

Commit c7e3d5d1 parent 65f2fe31 file · +10 −0Browse files

Unified · Split

libtcc.c+10−0
@@ -805,6 +805,11 @@ LIBTCCAPI TCCState *tcc_new(void) · 804 unmodified lines
805 tcc_define_symbol(s, "__STDC_VERSION__", "199901L");805 tcc_define_symbol(s, "__STDC_VERSION__", "199901L");
806 tcc_define_symbol(s, "__STDC_HOSTED__", NULL);806 tcc_define_symbol(s, "__STDC_HOSTED__", NULL);
807 807
808#if !defined(TCC_TARGET_PE)
809 /* glibc compatible macro (default for C99) */
810 tcc_define_symbol(s, "_ISOC99_SOURCE", "1");
811#endif
812
808 /* target defines */813 /* target defines */
809#if defined(TCC_TARGET_I386)814#if defined(TCC_TARGET_I386)
810 tcc_define_symbol(s, "__i386__", NULL);815 tcc_define_symbol(s, "__i386__", NULL);
@@ -1900,6 +1905,11 @@ reparse: · 1089 unmodified lines
1900 * encoding used is implementationdefined.1905 * encoding used is implementationdefined.
1901 */1906 */
1902 tcc_define_symbol(s, "__STDC_UTF_32__", "1");1907 tcc_define_symbol(s, "__STDC_UTF_32__", "1");
1908 /*
1909 * glibc compatible macro used when -std=c11 is used.
1910 * _ISOC99_SOURCE remains defined as does gcc.
1911 */
1912 tcc_define_symbol(s, "_ISOC11_SOURCE", "1");
1903#endif /* !TCC_TARGET_PE */1913#endif /* !TCC_TARGET_PE */
1904 s->cversion = 201112;1914 s->cversion = 201112;
1905 }1915 }

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