summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-08-24 21:38:38 +0000
committerbors <bors@rust-lang.org>2018-08-24 21:38:38 +0000
commitac7201bc02346acd3bfd42c9ae0b226ea3f168ff (patch)
tree9171604ecaeb414459dd100686247146f6047dbb
parent1844a772b60771d0124a157019f627d60fea4e73 (diff)
parent919dd7c8fc81fa70567d98c635530c8938c4b42e (diff)
downloadrust-libc-ac7201bc02346acd3bfd42c9ae0b226ea3f168ff.tar.gz
Auto merge of #1070 - redox-os:relibc, r=alexcrichton
Add additional Redox OS functions This adds `chown`, `fchown`, `setenv`, and `unsetenv` to the `redox` module, and reorders the functions by name
-rw-r--r--src/redox/mod.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/redox/mod.rs b/src/redox/mod.rs
index e32c4b385b..7c7f4229e6 100644
--- a/src/redox/mod.rs
+++ b/src/redox/mod.rs
@@ -118,15 +118,19 @@ pub const SIGPWR: ::c_int = 30;
pub const SIGSYS: ::c_int = 31;
extern {
+ pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
+ pub fn close(fd: ::c_int) -> ::c_int;
+ pub fn fchown(fd: ::c_int, uid: ::uid_t, gid: ::gid_t) -> ::c_int;
+ pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn getpid() -> pid_t;
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 read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) -> ::ssize_t;
+ pub fn setenv(name: *const c_char, val: *const c_char, overwrite: ::c_int)
+ -> ::c_int;
+ pub fn unsetenv(name: *const c_char) -> ::c_int;
pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
-> ::ssize_t;
- pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
- pub fn close(fd: ::c_int) -> ::c_int;
}
#[link(name = "c")]