From 7251cbec761d34ee33c85d4da2242d8a95e57d22 Mon Sep 17 00:00:00 2001 From: Jeremy Soller <jackpot51@gmail.com> Date: Sat, 3 Mar 2018 08:33:19 -0700 Subject: [PATCH] Add definitions for unistd --- unistd/src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/unistd/src/lib.rs b/unistd/src/lib.rs index ce905086..77ed2553 100644 --- a/unistd/src/lib.rs +++ b/unistd/src/lib.rs @@ -4,11 +4,26 @@ extern crate libc; use libc::*; +pub const NULL: c_int = 0; + pub const R_OK: c_int = 1; pub const W_OK: c_int = 2; pub const X_OK: c_int = 4; pub const F_OK: c_int = 8; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; + +pub const F_ULOCK: c_int = 0; +pub const F_LOCK: c_int = 1; +pub const F_TLOCK: c_int = 2; +pub const F_TEST: c_int = 3; + +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; + #[no_mangle] pub extern "C" fn _exit(status: c_int) { unimplemented!(); -- GitLab