2023-10-09 05:22:27 +08:00
|
|
|
use std::sync::atomic::AtomicPtr;
|
|
|
|
|
|
|
|
use libc::c_int;
|
|
|
|
use once_cell::sync::Lazy;
|
|
|
|
|
2023-03-26 23:23:05 +08:00
|
|
|
pub fn MB_CUR_MAX() -> usize {
|
|
|
|
unsafe { C_MB_CUR_MAX() }
|
|
|
|
}
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
fn C_MB_CUR_MAX() -> usize;
|
|
|
|
}
|
2023-03-26 23:23:05 +08:00
|
|
|
|
2023-04-09 20:33:20 +08:00
|
|
|
pub fn ST_LOCAL() -> u64 {
|
|
|
|
unsafe { C_ST_LOCAL() }
|
|
|
|
}
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
fn C_ST_LOCAL() -> u64;
|
|
|
|
}
|
2023-04-09 20:33:20 +08:00
|
|
|
|
|
|
|
pub fn MNT_LOCAL() -> u64 {
|
|
|
|
unsafe { C_MNT_LOCAL() }
|
|
|
|
}
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
fn C_MNT_LOCAL() -> u64;
|
|
|
|
}
|
2023-04-09 20:33:20 +08:00
|
|
|
|
2023-08-20 21:34:01 +08:00
|
|
|
pub fn _CS_PATH() -> i32 {
|
|
|
|
unsafe { C_CS_PATH() }
|
|
|
|
}
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
fn C_CS_PATH() -> i32;
|
|
|
|
}
|
2023-08-20 21:34:01 +08:00
|
|
|
|
2023-10-09 05:22:27 +08:00
|
|
|
pub static _PATH_BSHELL: AtomicPtr<i8> = AtomicPtr::new(std::ptr::null_mut());
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
pub fn C_PATH_BSHELL() -> *const i8;
|
|
|
|
}
|
2023-10-09 05:22:27 +08:00
|
|
|
|
|
|
|
pub static _PC_CASE_SENSITIVE: Lazy<c_int> = Lazy::new(|| unsafe { C_PC_CASE_SENSITIVE() });
|
2023-12-03 18:34:11 +08:00
|
|
|
extern "C" {
|
|
|
|
fn C_PC_CASE_SENSITIVE() -> c_int;
|
|
|
|
}
|
2023-10-09 05:22:27 +08:00
|
|
|
|
2023-03-26 23:23:05 +08:00
|
|
|
extern "C" {
|
2023-08-20 21:34:01 +08:00
|
|
|
pub(crate) fn confstr(
|
|
|
|
name: libc::c_int,
|
|
|
|
buf: *mut libc::c_char,
|
|
|
|
len: libc::size_t,
|
|
|
|
) -> libc::size_t;
|
2023-10-09 05:22:27 +08:00
|
|
|
pub fn C_O_EXLOCK() -> c_int;
|
|
|
|
pub fn stdout_stream() -> *mut libc::FILE;
|
|
|
|
pub fn UVAR_FILE_SET_MTIME_HACK() -> bool;
|
2023-03-26 23:23:05 +08:00
|
|
|
}
|