diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-04-13 11:16:06 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-13 11:16:06 -0400 |
| commit | 30c5f3c441e6090f29c0540b1fa8a20d6bd2fc0d (patch) | |
| tree | 420a68427efe9c2e3f95f50f3f56ebc9ca7aa14d /std/os/linux/index.zig | |
| parent | 1999f0daad505f414f97845ecde0a56b3c2fedfd (diff) | |
| parent | fe9489ad63ea8231bb0366d7608e52d0d30bfefb (diff) | |
| download | zig-30c5f3c441e6090f29c0540b1fa8a20d6bd2fc0d.tar.gz zig-30c5f3c441e6090f29c0540b1fa8a20d6bd2fc0d.zip | |
Merge pull request #915 from zig-lang/self-hosted-cli
Revise self-hosted command line interface
Diffstat (limited to 'std/os/linux/index.zig')
| -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); } |
