History

macos: add some macros to replace few __builtin_xxx functions used in headers.

Christian Jullien committed 6 years ago

Commit 6b2bed41 parent 15e4f8b1 file · +7 −1Browse files

Unified · Split

libtcc.c+7−1
@@ -948,7 +948,13 @@ LIBTCCAPI TCCState *tcc_new(void) · 947 unmodified lines
948948 tcc_define_symbol(s, "__GNUC__", "4"); /* darwin emits warning on GCC<4 */
949949 tcc_define_symbol(s, "__APPLE_CC__", "1"); /* for <TargetConditionals.h> */
950950 tcc_define_symbol(s, "__builtin_alloca", "alloca"); /* as we claim GNUC */
951−
951+ /* used by math.h */
952+ tcc_define_symbol(s, "__builtin_huge_val()", "1e500");
953+ tcc_define_symbol(s, "__builtin_huge_valf()", "1e50f");
954+ tcc_define_symbol(s, "__builtin_huge_vall()", "1e5000L");
955+ tcc_define_symbol(s, "__builtin_nanf(ignored_string)", "__nan()");
956+ /* used by _fd_def.h */
957+ tcc_define_symbol(s, "__builtin_bzero(p, ignored_size)", "bzero(p, sizeof(*(p)))");
952958 /* avoids usage of GCC/clang specific builtins in libc-headerfiles: */
953959 tcc_define_symbol(s, "__FINITE_MATH_ONLY__", "1");
954960 tcc_define_symbol(s, "_FORTIFY_SOURCE", "0");

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