diff options
| author | Andrea Orru <andrea@orru.io> | 2018-04-13 11:11:21 -0700 |
|---|---|---|
| committer | Andrea Orru <andrea@orru.io> | 2018-04-13 11:11:21 -0700 |
| commit | 06614b3fa09954464c2e2f32756cacedc178a282 (patch) | |
| tree | 37cd43b61b1c8be543551ef7e9f6605bce847947 /std/os/linux | |
| parent | d2c672ab0cc969f97e30cf6a12e4bffcac7cee18 (diff) | |
| parent | fa05cab01a755827209b6ede299402f515681a81 (diff) | |
| download | zig-06614b3fa09954464c2e2f32756cacedc178a282.tar.gz zig-06614b3fa09954464c2e2f32756cacedc178a282.zip | |
Merge branch 'master' into zen_stdlib
Diffstat (limited to 'std/os/linux')
| -rw-r--r-- | std/os/linux/index.zig | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/std/os/linux/index.zig b/std/os/linux/index.zig index aa2a6d85da..e100af7733 100644 --- a/std/os/linux/index.zig +++ b/std/os/linux/index.zig @@ -38,6 +38,11 @@ pub const MAP_STACK = 0x20000; pub const MAP_HUGETLB = 0x40000; pub const MAP_FILE = 0; +pub const F_OK = 0; +pub const X_OK = 1; +pub const W_OK = 2; +pub const R_OK = 4; + pub const WNOHANG = 1; pub const WUNTRACED = 2; pub const WSTOPPED = 2; @@ -705,6 +710,10 @@ pub fn pread(fd: i32, buf: &u8, count: usize, offset: usize) usize { return syscall4(SYS_pread, usize(fd), @ptrToInt(buf), count, offset); } +pub fn access(path: &const u8, mode: u32) usize { + return syscall2(SYS_access, @ptrToInt(path), mode); +} + pub fn pipe(fd: &[2]i32) usize { return pipe2(fd, 0); } |
