mirror of
https://github.com/ziglang/zig.git
synced 2025-12-23 22:53:06 +00:00
std: Add serenity to more OS checks
This commit is contained in:
parent
813a0f125e
commit
ce776d3245
@ -1548,6 +1548,7 @@ const have_sigwinch = switch (builtin.os.tag) {
|
|||||||
.visionos,
|
.visionos,
|
||||||
.dragonfly,
|
.dragonfly,
|
||||||
.freebsd,
|
.freebsd,
|
||||||
|
.serenity,
|
||||||
=> true,
|
=> true,
|
||||||
|
|
||||||
else => false,
|
else => false,
|
||||||
|
|||||||
@ -146,7 +146,7 @@ const CAllocator = struct {
|
|||||||
else {};
|
else {};
|
||||||
|
|
||||||
pub const supports_posix_memalign = switch (builtin.os.tag) {
|
pub const supports_posix_memalign = switch (builtin.os.tag) {
|
||||||
.dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos => true,
|
.dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true,
|
||||||
else => false,
|
else => false,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1129,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
|
|||||||
/// * Windows
|
/// * Windows
|
||||||
/// On these systems, the read races with concurrent writes to the same file descriptor.
|
/// 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 {
|
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) {
|
const have_pread_but_not_preadv = switch (native_os) {
|
||||||
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
|
.windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true,
|
||||||
else => false,
|
else => false,
|
||||||
};
|
};
|
||||||
if (have_pread_but_not_preadv) {
|
if (have_pread_but_not_preadv) {
|
||||||
|
|||||||
@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void {
|
|||||||
.visionos,
|
.visionos,
|
||||||
.dragonfly,
|
.dragonfly,
|
||||||
.freebsd,
|
.freebsd,
|
||||||
|
.serenity,
|
||||||
=> true,
|
=> true,
|
||||||
|
|
||||||
else => false,
|
else => false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user