cgen: re-add stdbool.h for iOS only

This reverts 8121a8a and fixes 0939946
pull/13883/head
Cameron Katri 2022-03-30 21:25:35 -04:00
parent 61f078664c
commit fbdf519d32
No known key found for this signature in database
GPG Key ID: BAFFD97826540F1C
1 changed files with 3 additions and 1 deletions

View File

@ -652,7 +652,9 @@ pub fn (mut g Gen) init() {
g.cheaders.writeln('#include <stddef.h>')
} else {
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(get_guarded_include_text('<stdbool.h>', 'The C compiler can not find <stdbool.h>. Please install build-essentials')) // bool, true, false
if g.pref.os == .ios {
g.cheaders.writeln(get_guarded_include_text('<stdbool.h>', 'The C compiler can not find <stdbool.h>. Please install build-essentials')) // bool, true, false
}
g.cheaders.writeln(get_guarded_include_text('<stddef.h>', 'The C compiler can not find <stddef.h>. Please install build-essentials')) // size_t, ptrdiff_t
}
}