diff options
| author | David CARLIER <devnexen@gmail.com> | 2023-05-31 23:17:08 +0100 |
|---|---|---|
| committer | Isaac Freund <mail@isaacfreund.com> | 2023-06-22 10:21:48 +0000 |
| commit | 64f0059cd33b571d6cf91df45f4cb2e0af9c0742 (patch) | |
| tree | 9f64b090f6342442ce07e680eb608402cccd65f2 /lib/std/c | |
| parent | 82470d4f892af2efa64acd58ab3188fa917ace0c (diff) | |
| download | zig-64f0059cd33b571d6cf91df45f4cb2e0af9c0742.tar.gz zig-64f0059cd33b571d6cf91df45f4cb2e0af9c0742.zip | |
std.c: update netbsd/openbsd mman constants
Diffstat (limited to 'lib/std/c')
| -rw-r--r-- | lib/std/c/netbsd.zig | 16 | ||||
| -rw-r--r-- | lib/std/c/openbsd.zig | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/lib/std/c/netbsd.zig b/lib/std/c/netbsd.zig index 8f3837b2bb..2c7c236ed0 100644 --- a/lib/std/c/netbsd.zig +++ b/lib/std/c/netbsd.zig @@ -579,6 +579,12 @@ pub const PROT = struct { pub const READ = 1; pub const WRITE = 2; pub const EXEC = 4; + pub fn MPROTECT(flag: u32) u32 { + return flag << 3; + } + pub fn MPROTECT_EXTRACT(flag: u32) u32 { + return (flag >> 3) & 0x7; + } }; pub const CLOCK = struct { @@ -621,6 +627,16 @@ pub const MAP = struct { pub const ALIGNMENT_64PB = MAP.ALIGNED(56); }; +pub const MADV = struct { + pub const NORMAL = 0; + pub const RANDOM = 1; + pub const SEQUENTIAL = 2; + pub const WILLNEED = 3; + pub const DONTNEED = 4; + pub const SPACEAVAIL = 5; + pub const FREE = 6; +}; + pub const MSF = struct { pub const ASYNC = 1; pub const INVALIDATE = 2; diff --git a/lib/std/c/openbsd.zig b/lib/std/c/openbsd.zig index 4d44461237..47c1aec862 100644 --- a/lib/std/c/openbsd.zig +++ b/lib/std/c/openbsd.zig @@ -466,6 +466,16 @@ pub const MAP = struct { pub const CONCEAL = 0x8000; }; +pub const MADV = struct { + pub const NORMAL = 0; + pub const RANDOM = 1; + pub const SEQUENTIAL = 2; + pub const WILLNEED = 3; + pub const DONTNEED = 4; + pub const SPACEAVAIL = 5; + pub const FREE = 6; +}; + pub const MSF = struct { pub const ASYNC = 1; pub const INVALIDATE = 2; |
