Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/std/Io/Threaded.zig
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ pub fn ioBasic(t: *Threaded) Io {
};
}

pub const socket_flags_unsupported = native_os.isDarwin() or native_os == .haiku; // 💩💩
pub const socket_flags_unsupported = native_os.isDarwin() or native_os == .haiku;
const have_accept4 = !socket_flags_unsupported;
const have_flock_open_flags = @hasField(posix.O, "EXLOCK");
const have_networking = native_os != .wasi;
Expand All @@ -367,7 +367,7 @@ const have_futex = switch (builtin.cpu.arch) {
else => true,
};
const have_preadv = switch (native_os) {
.windows, .haiku, .serenity => false, // 💩💩💩
.windows, .haiku => false,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest directing "hey, can you look into this" at the appropriate person instead of adding a comment with poop emojis the next time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, fair criticism. Thanks for speaking up.

else => true,
};
const have_sig_io = posix.SIG != void and @hasField(posix.SIG, "IO");
Expand Down
3 changes: 1 addition & 2 deletions lib/std/posix.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1114,9 +1114,8 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
/// * Windows
/// On these systems, the read races with concurrent writes to the same file descriptor.
pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
// NOTE: serenity does not have preadv but it *does* have pwritev.
const have_pread_but_not_preadv = switch (native_os) {
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true,
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
else => false,
};
if (have_pread_but_not_preadv) {
Expand Down