Remove weak linkage from getopt functions and globals
This commit is contained in:
@@ -26,7 +26,6 @@ pub struct option {
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
#[linkage = "weak"] // often redefined in GNU programs
|
||||
pub unsafe extern "C" fn getopt_long(
|
||||
argc: c_int,
|
||||
argv: *const *mut c_char,
|
||||
|
||||
@@ -7,30 +7,25 @@ use crate::{header::getopt, platform::types::*};
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[unsafe(no_mangle)]
|
||||
#[linkage = "weak"] // often redefined in GNU programs
|
||||
pub static mut optarg: *mut c_char = ptr::null_mut();
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/functions/getopt.html>.
|
||||
#[allow(non_upper_case_globals)]
|
||||
#[unsafe(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)]
|
||||
#[unsafe(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)]
|
||||
#[unsafe(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>.
|
||||
#[unsafe(no_mangle)]
|
||||
#[linkage = "weak"] // often redefined in GNU programs
|
||||
pub unsafe extern "C" fn getopt(
|
||||
argc: c_int,
|
||||
argv: *const *mut c_char,
|
||||
|
||||
Reference in New Issue
Block a user