diff --git a/src/header/unistd/mod.rs b/src/header/unistd/mod.rs index f2bce45388..9863c063ea 100644 --- a/src/header/unistd/mod.rs +++ b/src/header/unistd/mod.rs @@ -31,6 +31,9 @@ pub use self::{brk::*, getopt::*, getpass::getpass, pathconf::*, sysconf::*}; // cuserid() marked legacy in Issue 5. pub use crate::header::stdio::{ctermid, cuserid}; +// TODO: implement and reexport fcntl functions: +//pub use crate::header::fcntl::{faccessat, fchownat, fexecve, linkat, readlinkat, symlinkat, unlinkat}; + use super::errno::{E2BIG, ENOMEM}; mod brk; @@ -71,6 +74,12 @@ unsafe fn init_fork_hooks<'a>() -> &'a mut [LinkedList; 3] { ) } +/// See . +// #[no_mangle] +pub unsafe extern "C" fn _Fork() -> pid_t { + unimplemented!(); +} + /// See . #[no_mangle] pub extern "C" fn _exit(status: c_int) -> ! { @@ -204,6 +213,12 @@ pub extern "C" fn dup2(fildes: c_int, fildes2: c_int) -> c_int { Sys::dup2(fildes, fildes2).or_minus_one_errno() } +/// See . +// #[no_mangle] +pub extern "C" fn dup3(fildes: c_int, fildes2: c_int, flag: c_int) -> c_int { + unimplemented!(); +} + /// See . /// /// # Deprecation @@ -436,6 +451,12 @@ pub extern "C" fn getegid() -> gid_t { Sys::getegid() } +/// See . +// #[no_mangle] +pub extern "C" fn getentropy(buffer: *mut c_void, length: size_t) -> c_int { + unimplemented!(); +} + /// See . #[no_mangle] pub extern "C" fn geteuid() -> uid_t { @@ -547,6 +568,18 @@ pub extern "C" fn getppid() -> pid_t { Sys::getppid() } +/// See . +// #[no_mangle] +pub extern "C" fn getresgid(rgid: *mut gid_t, egid: *mut gid_t, sgid: *mut gid_t) -> c_int { + unimplemented!(); +} + +/// See . +// #[no_mangle] +pub extern "C" fn getresuid(ruid: *mut uid_t, euid: *mut uid_t, suid: *mut uid_t) -> c_int { + unimplemented!(); +} + /// See . #[no_mangle] pub extern "C" fn getsid(pid: pid_t) -> pid_t { @@ -670,6 +703,12 @@ pub unsafe extern "C" fn pipe2(fildes: *mut c_int, flags: c_int) -> c_int { .or_minus_one_errno() } +/// See . +// #[no_mangle] +pub extern "C" fn posix_close(fildes: c_int, flag: c_int) -> c_int { + unimplemented!(); +} + /// See . #[no_mangle] pub unsafe extern "C" fn pread( @@ -770,6 +809,18 @@ pub unsafe extern "C" fn set_default_scheme(scheme: *const c_char) -> c_int { .or_minus_one_errno() } +/// See . +// #[no_mangle] +pub extern "C" fn setegid(gid: gid_t) -> c_int { + unimplemented!(); +} + +/// See . +// #[no_mangle] +pub extern "C" fn seteuid(uid: uid_t) -> c_int { + unimplemented!(); +} + /// See . #[no_mangle] pub extern "C" fn setgid(gid: gid_t) -> c_int {