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

cgen: format cgen.init() generated c codes (#14824)

This commit is contained in:
yuyi 2022-06-23 02:39:15 +08:00 committed by GitHub
parent 3fb88500a2
commit e6c3de2f46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -657,10 +657,10 @@ pub fn (mut g Gen) init() {
g.cheaders.writeln('#include <stddef.h>') g.cheaders.writeln('#include <stddef.h>')
} else { } else {
tcc_undef_has_include := ' tcc_undef_has_include := '
#if defined(__TINYC__) && defined(__has_include) #if defined(__TINYC__) && defined(__has_include)
// tcc does not support has_include properly yet, turn it off completely // tcc does not support has_include properly yet, turn it off completely
#undef __has_include #undef __has_include
#endif' #endif'
g.cheaders.writeln(tcc_undef_has_include) g.cheaders.writeln(tcc_undef_has_include)
g.includes.writeln(tcc_undef_has_include) g.includes.writeln(tcc_undef_has_include)
if g.pref.os == .freebsd { if g.pref.os == .freebsd {