diff options
author | Daniel Mueller <deso@posteo.net> | 2017-09-16 08:42:30 -0700 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2017-09-16 08:42:30 -0700 |
commit | bcaabae7c22d27fdbb07ea6009a6f4a9c3672fa2 (patch) | |
tree | e7470179e1bfb3fff279450e402ddcaf038ae086 /libc/src/redox.rs | |
parent | ab3c2a935b1ba655de2f3fec35da2c14b69966dc (diff) | |
download | nitrocli-bcaabae7c22d27fdbb07ea6009a6f4a9c3672fa2.tar.gz nitrocli-bcaabae7c22d27fdbb07ea6009a6f4a9c3672fa2.tar.bz2 |
Update libc crate to 0.2.30
Import subrepo libc/:libc at 3520512a8c9cb55661910318a6fb169a75c02a59
Diffstat (limited to 'libc/src/redox.rs')
-rw-r--r-- | libc/src/redox.rs | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/libc/src/redox.rs b/libc/src/redox.rs index 3f2ed9c..7ff4ea0 100644 --- a/libc/src/redox.rs +++ b/libc/src/redox.rs @@ -4,7 +4,7 @@ pub type c_ulong = u64; pub type wchar_t = i16; -pub type off_t = usize; +pub type off_t = c_long; pub type mode_t = u16; pub type time_t = i64; pub type pid_t = usize; @@ -48,8 +48,47 @@ s! { } } +pub const STDIN_FILENO: ::c_int = 0; +pub const STDOUT_FILENO: ::c_int = 1; +pub const STDERR_FILENO: ::c_int = 2; + +pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: ::c_int = 0; + +pub const S_ISUID: ::c_int = 0x800; +pub const S_ISGID: ::c_int = 0x400; +pub const S_ISVTX: ::c_int = 0x200; + +pub const S_IFIFO: mode_t = 0x1000; +pub const S_IFCHR: mode_t = 0x2000; +pub const S_IFBLK: mode_t = 0x6000; +pub const S_IFDIR: mode_t = 0x4000; +pub const S_IFREG: mode_t = 0x8000; +pub const S_IFLNK: mode_t = 0xA000; +pub const S_IFSOCK: mode_t = 0xC000; +pub const S_IFMT: mode_t = 0xF000; +pub const S_IEXEC: mode_t = 0x40; +pub const S_IWRITE: mode_t = 0x80; +pub const S_IREAD: mode_t = 0x100; +pub const S_IRWXU: mode_t = 0x1C0; +pub const S_IXUSR: mode_t = 0x40; +pub const S_IWUSR: mode_t = 0x80; +pub const S_IRUSR: mode_t = 0x100; +pub const S_IRWXG: mode_t = 0x38; +pub const S_IXGRP: mode_t = 0x8; +pub const S_IWGRP: mode_t = 0x10; +pub const S_IRGRP: mode_t = 0x20; +pub const S_IRWXO: mode_t = 0x7; +pub const S_IXOTH: mode_t = 0x1; +pub const S_IWOTH: mode_t = 0x2; +pub const S_IROTH: mode_t = 0x4; + extern { pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) + -> ::ssize_t; + pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) + -> ::ssize_t; } #[link(name = "c")] |