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
805805 tcc_define_symbol(s, "__STDC_VERSION__", "199901L");
806806 tcc_define_symbol(s, "__STDC_HOSTED__", NULL);
807807
808+#if !defined(TCC_TARGET_PE)
809+ /* glibc compatible macro (default for C99) */
810+ tcc_define_symbol(s, "_ISOC99_SOURCE", "1");
811+#endif
812+
808813 /* target defines */
809814 #if defined(TCC_TARGET_I386)
810815 tcc_define_symbol(s, "__i386__", NULL);
@@ -1900,6 +1905,11 @@ reparse: · 1089 unmodified lines
19001905 * encoding used is implementationdefined.
19011906 */
19021907 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");
19031913 #endif /* !TCC_TARGET_PE */
19041914 s->cversion = 201112;
19051915 }

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