diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-25 17:42:14 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-25 17:42:14 -0700 |
| commit | 4360f45d7fa242f95aae86a137d56c737798dccf (patch) | |
| tree | c91b4a5d529a54fe8c3f67de7e92ee63e2516ef4 /lib/std/os.zig | |
| parent | 153c97ac9ec8deafb0777ae424f00695c18e3bd9 (diff) | |
| download | zig-4360f45d7fa242f95aae86a137d56c737798dccf.tar.gz zig-4360f45d7fa242f95aae86a137d56c737798dccf.zip | |
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.
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index 6b13ec94c9..24d9041639 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -3892,21 +3892,6 @@ pub fn pipe2(flags: u32) PipeError![2]fd_t { } } } - if (std.Target.current.os.tag == .haiku) { - var fds: [2]fd_t = try pipe(); - if (flags == 0) return fds; - errdefer { - close(fds[0]); - close(fds[1]); - } - for (fds) |fd| switch (errno(system.fcntl(fd, F_SETFL, flags))) { - 0 => {}, - EINVAL => unreachable, // Invalid flags - EBADF => unreachable, // Always a race condition - else => |err| return unexpectedErrno(err), - }; - return fds; - } const new_flags = flags & ~@as(u32, O_CLOEXEC); // Set every other flag affecting the file status using F_SETFL. |
