authorgravatar for 3811822-hoanga@users.noreply.gitlab.comAl Hoang <3811822-hoanga@users.noreply.gitlab.com> 2021-04-23 23:37:35-05:00
committergravatar for 3811822-hoanga@users.noreply.gitlab.comAl Hoang <3811822-hoanga@users.noreply.gitlab.com> 2021-04-23 23:37:35-05:00
log7a78b92fa0283501664a6f25bc68471dea04fab5
treedd57174b721efa428eecfe214274b354762c20e5
parenta279f18bce488460f87f41545411fc964dcaa4b0

header path detection for haiku


1 files changed, 9 insertions(+), 2 deletions(-)

src/libc_installation.zig+9-2
......@@ -9,6 +9,7 @@ const build_options = @import("build_options");
99const is_darwin = Target.current.isDarwin();
1010const is_windows = Target.current.os.tag == .windows;
1111const is_gnu = Target.current.isGnu();
12const is_haiku = Target.current.os.tag == .haiku;
1213
1314const log = std.log.scoped(.libc_installation);
1415
......@@ -279,8 +280,14 @@ pub const LibCInstallation = struct {
279280 return error.CCompilerCannotFindHeaders;
280281 }
281282
282 const include_dir_example_file = "stdlib.h";
283 const sys_include_dir_example_file = if (is_windows) "sys\\types.h" else "sys/errno.h";
283 const include_dir_example_file = if (is_haiku) "posix/stdlib.h" else "stdlib.h";
284 const sys_include_dir_example_file = if (is_windows)
285 "sys\\types.h"
286 else if (is_haiku)
287 "posix/errno.h"
288 else
289 "sys/errno.h"
290 ;
284291
285292 var path_i: usize = 0;
286293 while (path_i < search_paths.items.len) : (path_i += 1) {