Add docs for unistd submodules

This commit is contained in:
Peter Limkilde Svendsen
2025-02-01 18:07:51 +01:00
parent 99e0948e0c
commit 26fdc200bf
5 changed files with 31 additions and 5 deletions
+10 -5
View File
@@ -4,26 +4,31 @@ use core::ptr;
use crate::{header::getopt, platform::types::*};
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
#[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 <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
#[allow(non_upper_case_globals)]
#[no_mangle]
#[linkage = "weak"] // often redefined in GNU programs
pub static mut opterr: c_int = 1;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
#[allow(non_upper_case_globals)]
#[no_mangle]
#[linkage = "weak"] // often redefined in GNU programs
pub static mut optind: c_int = 1;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
#[allow(non_upper_case_globals)]
#[no_mangle]
#[linkage = "weak"] // often redefined in GNU programs
pub static mut optopt: c_int = -1;
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
#[no_mangle]
#[linkage = "weak"] // often redefined in GNU programs
pub unsafe extern "C" fn getopt(