macos: internally define _DONT_USE_CTYPE_INLINE_ otherwise, ctype.h macros may be defined multiple times in different translation units.

This commit is contained in:
Christian Jullien 2020-06-23 15:53:01 +02:00
parent 6b2bed447f
commit 8bad5bfae5

View File

@ -947,6 +947,7 @@ LIBTCCAPI TCCState *tcc_new(void)
tcc_define_symbol(s, "__APPLE__", "1");
tcc_define_symbol(s, "__GNUC__", "4"); /* darwin emits warning on GCC<4 */
tcc_define_symbol(s, "__APPLE_CC__", "1"); /* for <TargetConditionals.h> */
tcc_define_symbol(s, "_DONT_USE_CTYPE_INLINE_", "1");
tcc_define_symbol(s, "__builtin_alloca", "alloca"); /* as we claim GNUC */
/* used by math.h */
tcc_define_symbol(s, "__builtin_huge_val()", "1e500");