mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 23:10:09 +00:00
std.posix: Default ACCMODE to NONE for serenity
Unlike all other platforms where RDONLY is 0 it does not work as a default for the O flags on serenity - various syscalls other than 'open', e.g. 'pipe', return EINVAL if unexpected bits are set in the flags.
This commit is contained in:
parent
f5e9384335
commit
813a0f125e
@ -8604,7 +8604,7 @@ pub const O = switch (native_os) {
|
||||
},
|
||||
// https://github.com/SerenityOS/serenity/blob/2808b0376406a40e31293bb3bcb9170374e90506/Kernel/API/POSIX/fcntl.h#L28-L43
|
||||
.serenity => packed struct(c_int) {
|
||||
ACCMODE: std.posix.ACCMODE = .RDONLY,
|
||||
ACCMODE: std.posix.ACCMODE = .NONE,
|
||||
EXEC: bool = false,
|
||||
CREAT: bool = false,
|
||||
EXCL: bool = false,
|
||||
|
||||
@ -204,6 +204,7 @@ pub const ACCMODE = switch (native_os) {
|
||||
// implements this suggestion.
|
||||
// https://github.com/SerenityOS/serenity/blob/4adc51fdf6af7d50679c48b39362e062f5a3b2cb/Kernel/API/POSIX/fcntl.h#L28-L30
|
||||
.serenity => enum(u2) {
|
||||
NONE = 0,
|
||||
RDONLY = 1,
|
||||
WRONLY = 2,
|
||||
RDWR = 3,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user