authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-25 17:42:14-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-02-25 17:42:14-07:00
log4360f45d7fa242f95aae86a137d56c737798dccf
treec91b4a5d529a54fe8c3f67de7e92ee63e2516ef4
parent153c97ac9ec8deafb0777ae424f00695c18e3bd9

std.os: remove special case for haiku

This is an accident from a merge conflict introduced in 7edb204edfa41e11776ac009da5a20fb1c907f5f. The new pipe2 code I believe is supposed to work for all posix-like systems. If haiku needs special handling here, it should be re-introduced.

1 files changed, 0 insertions(+), 15 deletions(-)

lib/std/os.zig-15
......@@ -3892,21 +3892,6 @@ pub fn pipe2(flags: u32) PipeError![2]fd_t {
38923892 }
38933893 }
38943894 }
3895 if (std.Target.current.os.tag == .haiku) {
3896 var fds: [2]fd_t = try pipe();
3897 if (flags == 0) return fds;
3898 errdefer {
3899 close(fds[0]);
3900 close(fds[1]);
3901 }
3902 for (fds) |fd| switch (errno(system.fcntl(fd, F_SETFL, flags))) {
3903 0 => {},
3904 EINVAL => unreachable, // Invalid flags
3905 EBADF => unreachable, // Always a race condition
3906 else => |err| return unexpectedErrno(err),
3907 };
3908 return fds;
3909 }
39103895
39113896 const new_flags = flags & ~@as(u32, O_CLOEXEC);
39123897 // Set every other flag affecting the file status using F_SETFL.