1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: undef *earlier* __has_include for tcc

This commit is contained in:
Delyan Angelov 2020-11-30 21:29:03 +02:00
parent 14f45bb8ef
commit 5bca6a4bfe

View File

@ -306,6 +306,12 @@ pub fn (mut g Gen) init() {
g.cheaders.writeln(g.pref.custom_prelude)
} else if !g.pref.no_preludes {
g.cheaders.writeln('// Generated by the V compiler')
g.cheaders.writeln('
#if defined(__TINYC__) && defined(__has_include)
// tcc does not support has_include properly yet, turn it off completely
#undef __has_include
#endif
')
g.cheaders.writeln(get_guarded_include_text('<inttypes.h>', 'The C compiler can not find <inttypes.h> . Please install build-essentials')) // int64_t etc
g.cheaders.writeln(c_builtin_types)
if g.pref.is_bare {