header path detection for haiku

This commit is contained in:
Al Hoang
2021-04-23 23:37:35 -05:00
parent a279f18bce
commit 7a78b92fa0

View File

@@ -9,6 +9,7 @@ const build_options = @import("build_options");
const is_darwin = Target.current.isDarwin();
const is_windows = Target.current.os.tag == .windows;
const is_gnu = Target.current.isGnu();
const is_haiku = Target.current.os.tag == .haiku;
const log = std.log.scoped(.libc_installation);
@@ -279,8 +280,14 @@ pub const LibCInstallation = struct {
return error.CCompilerCannotFindHeaders;
}
const include_dir_example_file = "stdlib.h";
const sys_include_dir_example_file = if (is_windows) "sys\\types.h" else "sys/errno.h";
const include_dir_example_file = if (is_haiku) "posix/stdlib.h" else "stdlib.h";
const sys_include_dir_example_file = if (is_windows)
"sys\\types.h"
else if (is_haiku)
"posix/errno.h"
else
"sys/errno.h"
;
var path_i: usize = 0;
while (path_i < search_paths.items.len) : (path_i += 1) {