| author | |
| committer | |
| log | 982c387753c33a9eb42349c109fc4a6ed0675165 |
| tree | d3314abedac7c83e2f2c0e932dba78b9284e1270 |
| parent | 627a292a1139c96f5de80084ab5ce8b852db5132 |
| parent | ce776d32455f5ac43f91cc8904765836c00605cf |
| signature |
std: A few more fixes for serenity5 files changed, 13 insertions(+), 9 deletions(-)
lib/std/Progress.zig+1| ... | ... | @@ -1548,6 +1548,7 @@ const have_sigwinch = switch (builtin.os.tag) { |
| 1548 | 1548 | .visionos, |
| 1549 | 1549 | .dragonfly, |
| 1550 | 1550 | .freebsd, |
| 1551 | .serenity, | |
| 1551 | 1552 | => true, |
| 1552 | 1553 | |
| 1553 | 1554 | else => false, |
lib/std/c.zig+7-7| ... | ... | @@ -4131,7 +4131,7 @@ pub const msghdr_const = switch (native_os) { |
| 4131 | 4131 | .serenity => extern struct { |
| 4132 | 4132 | name: ?*const anyopaque, |
| 4133 | 4133 | namelen: socklen_t, |
| 4134 | iov: [*]const iovec, | |
| 4134 | iov: [*]const iovec_const, | |
| 4135 | 4135 | iovlen: c_uint, |
| 4136 | 4136 | control: ?*const anyopaque, |
| 4137 | 4137 | controllen: socklen_t, |
| ... | ... | @@ -8614,7 +8614,7 @@ pub const O = switch (native_os) { |
| 8614 | 8614 | }, |
| 8615 | 8615 | // https://github.com/SerenityOS/serenity/blob/2808b0376406a40e31293bb3bcb9170374e90506/Kernel/API/POSIX/fcntl.h#L28-L43 |
| 8616 | 8616 | .serenity => packed struct(c_int) { |
| 8617 | ACCMODE: std.posix.ACCMODE = .RDONLY, | |
| 8617 | ACCMODE: std.posix.ACCMODE = .NONE, | |
| 8618 | 8618 | EXEC: bool = false, |
| 8619 | 8619 | CREAT: bool = false, |
| 8620 | 8620 | EXCL: bool = false, |
| ... | ... | @@ -8770,10 +8770,10 @@ pub const MAP = switch (native_os) { |
| 8770 | 8770 | }, |
| 8771 | 8771 | // https://github.com/SerenityOS/serenity/blob/6d59d4d3d9e76e39112842ec487840828f1c9bfe/Kernel/API/POSIX/sys/mman.h#L16-L26 |
| 8772 | 8772 | .serenity => packed struct(c_int) { |
| 8773 | FILE: bool = false, | |
| 8774 | SHARED: bool = false, | |
| 8775 | PRIVATE: bool = false, | |
| 8776 | _3: u2 = 0, | |
| 8773 | TYPE: enum(u4) { | |
| 8774 | SHARED = 0x01, | |
| 8775 | PRIVATE = 0x02, | |
| 8776 | }, | |
| 8777 | 8777 | FIXED: bool = false, |
| 8778 | 8778 | ANONYMOUS: bool = false, |
| 8779 | 8779 | STACK: bool = false, |
| ... | ... | @@ -8781,7 +8781,7 @@ pub const MAP = switch (native_os) { |
| 8781 | 8781 | RANDOMIZED: bool = false, |
| 8782 | 8782 | PURGEABLE: bool = false, |
| 8783 | 8783 | FIXED_NOREPLACE: bool = false, |
| 8784 | _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 12) = 0, | |
| 8784 | _: std.meta.Int(.unsigned, @bitSizeOf(c_int) - 11) = 0, | |
| 8785 | 8785 | }, |
| 8786 | 8786 | else => void, |
| 8787 | 8787 | }; |
lib/std/heap.zig+1-1| ... | ... | @@ -146,7 +146,7 @@ const CAllocator = struct { |
| 146 | 146 | else {}; |
| 147 | 147 | |
| 148 | 148 | pub const supports_posix_memalign = switch (builtin.os.tag) { |
| 149 | .dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos => true, | |
| 149 | .dragonfly, .netbsd, .freebsd, .solaris, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true, | |
| 150 | 150 | else => false, |
| 151 | 151 | }; |
| 152 | 152 |
lib/std/posix.zig+3-1| ... | ... | @@ -204,6 +204,7 @@ pub const ACCMODE = switch (native_os) { |
| 204 | 204 | // implements this suggestion. |
| 205 | 205 | // https://github.com/SerenityOS/serenity/blob/4adc51fdf6af7d50679c48b39362e062f5a3b2cb/Kernel/API/POSIX/fcntl.h#L28-L30 |
| 206 | 206 | .serenity => enum(u2) { |
| 207 | NONE = 0, | |
| 207 | 208 | RDONLY = 1, |
| 208 | 209 | WRONLY = 2, |
| 209 | 210 | RDWR = 3, |
| ... | ... | @@ -1128,8 +1129,9 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void { |
| 1128 | 1129 | /// * Windows |
| 1129 | 1130 | /// On these systems, the read races with concurrent writes to the same file descriptor. |
| 1130 | 1131 | pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize { |
| 1132 | // NOTE: serenity does not have preadv but it *does* have pwritev. | |
| 1131 | 1133 | const have_pread_but_not_preadv = switch (native_os) { |
| 1132 | .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true, | |
| 1134 | .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku, .serenity => true, | |
| 1133 | 1135 | else => false, |
| 1134 | 1136 | }; |
| 1135 | 1137 | if (have_pread_but_not_preadv) { |
lib/std/start.zig+1| ... | ... | @@ -699,6 +699,7 @@ fn maybeIgnoreSigpipe() void { |
| 699 | 699 | .visionos, |
| 700 | 700 | .dragonfly, |
| 701 | 701 | .freebsd, |
| 702 | .serenity, | |
| 702 | 703 | => true, |
| 703 | 704 | |
| 704 | 705 | else => false, |