From 5bca6a4bfe8a9e88a7bff9e8d0b585279762d748 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 30 Nov 2020 21:29:03 +0200 Subject: [PATCH] cgen: undef *earlier* __has_include for tcc --- vlib/v/gen/cgen.v | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index 3a4476c73c..d82394ec46 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -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('', 'The C compiler can not find . Please install build-essentials')) // int64_t etc g.cheaders.writeln(c_builtin_types) if g.pref.is_bare {