mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.c: update netbsd/openbsd mman constants
This commit is contained in:
parent
82470d4f89
commit
64f0059cd3
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user