diff --git a/src/header/unistd/brk.rs b/src/header/unistd/brk.rs index 47907758cf..73e7029040 100644 --- a/src/header/unistd/brk.rs +++ b/src/header/unistd/brk.rs @@ -8,6 +8,12 @@ use crate::{ static mut BRK: *mut c_void = ptr::null_mut(); +/// See . +/// +/// # Deprecation +/// The `brk()` function was marked legacy in the System Interface & Headers +/// Issue 5, and removed in Issue 6. +#[deprecated] #[no_mangle] pub unsafe extern "C" fn brk(addr: *mut c_void) -> c_int { BRK = Sys::brk(addr).or_errno_null_mut(); @@ -20,6 +26,12 @@ pub unsafe extern "C" fn brk(addr: *mut c_void) -> c_int { 0 } +/// See . +/// +/// # Deprecation +/// The `sbrk()` function was marked legacy in the System Interface & Headers +/// Issue 5, and removed in Issue 6. +#[deprecated] #[no_mangle] pub unsafe extern "C" fn sbrk(incr: intptr_t) -> *mut c_void { if BRK.is_null() { diff --git a/src/header/unistd/getopt.rs b/src/header/unistd/getopt.rs index e0b82c569f..5a3f28378c 100644 --- a/src/header/unistd/getopt.rs +++ b/src/header/unistd/getopt.rs @@ -4,26 +4,31 @@ use core::ptr; use crate::{header::getopt, platform::types::*}; +/// See . #[allow(non_upper_case_globals)] #[no_mangle] #[linkage = "weak"] // often redefined in GNU programs pub static mut optarg: *mut c_char = ptr::null_mut(); -#[allow(non_upper_case_globals)] -#[no_mangle] -#[linkage = "weak"] // often redefined in GNU programs -pub static mut optind: c_int = 1; - +/// See . #[allow(non_upper_case_globals)] #[no_mangle] #[linkage = "weak"] // often redefined in GNU programs pub static mut opterr: c_int = 1; +/// See . +#[allow(non_upper_case_globals)] +#[no_mangle] +#[linkage = "weak"] // often redefined in GNU programs +pub static mut optind: c_int = 1; + +/// See . #[allow(non_upper_case_globals)] #[no_mangle] #[linkage = "weak"] // often redefined in GNU programs pub static mut optopt: c_int = -1; +/// See . #[no_mangle] #[linkage = "weak"] // often redefined in GNU programs pub unsafe extern "C" fn getopt( diff --git a/src/header/unistd/getpass.rs b/src/header/unistd/getpass.rs index 6776cad85b..0385cc71bb 100644 --- a/src/header/unistd/getpass.rs +++ b/src/header/unistd/getpass.rs @@ -60,6 +60,12 @@ fn getpass_rs(prompt: CStr, passbuff: &mut [u8]) -> Result<*mut c_char, io::Erro Ok(passbuff.as_mut_ptr() as *mut c_char) } +/// See . +/// +/// # Deprecation +/// The `getpass()` function was marked legacy in the Open Group System +/// Interface & Headers Issue 5, and removed in Issue 6. +#[deprecated] #[no_mangle] pub unsafe extern "C" fn getpass(prompt: *const c_char) -> *mut c_char { static mut PASSBUFF: [u8; PASS_MAX] = [0; PASS_MAX]; diff --git a/src/header/unistd/pathconf.rs b/src/header/unistd/pathconf.rs index 074b65092f..0d81dade9c 100644 --- a/src/header/unistd/pathconf.rs +++ b/src/header/unistd/pathconf.rs @@ -56,11 +56,13 @@ fn pc(name: c_int) -> c_long { } } +/// See . #[no_mangle] pub extern "C" fn fpathconf(_fildes: c_int, name: c_int) -> c_long { pc(name) } +/// See . #[no_mangle] pub extern "C" fn pathconf(_path: *const c_char, name: c_int) -> c_long { pc(name) diff --git a/src/header/unistd/sysconf.rs b/src/header/unistd/sysconf.rs index 5e13346019..23b4fc385e 100644 --- a/src/header/unistd/sysconf.rs +++ b/src/header/unistd/sysconf.rs @@ -33,6 +33,7 @@ pub const _SC_SYMLOOP_MAX: c_int = 173; pub const _SC_HOST_NAME_MAX: c_int = 180; // } POSIX.1 +/// See . #[no_mangle] pub extern "C" fn sysconf(name: c_int) -> c_long { //TODO: Real values