mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-29 05:03:46 +08:00
compat.rs: group declarations
This commit is contained in:
parent
43e2d7b48c
commit
31ecc5e0f9
|
@ -3,44 +3,50 @@ use std::sync::atomic::AtomicPtr;
|
|||
use libc::c_int;
|
||||
use once_cell::sync::Lazy;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn MB_CUR_MAX() -> usize {
|
||||
unsafe { C_MB_CUR_MAX() }
|
||||
}
|
||||
extern "C" {
|
||||
fn C_MB_CUR_MAX() -> usize;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn ST_LOCAL() -> u64 {
|
||||
unsafe { C_ST_LOCAL() }
|
||||
}
|
||||
extern "C" {
|
||||
fn C_ST_LOCAL() -> u64;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn MNT_LOCAL() -> u64 {
|
||||
unsafe { C_MNT_LOCAL() }
|
||||
}
|
||||
extern "C" {
|
||||
fn C_MNT_LOCAL() -> u64;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn _CS_PATH() -> i32 {
|
||||
unsafe { C_CS_PATH() }
|
||||
}
|
||||
extern "C" {
|
||||
fn C_CS_PATH() -> i32;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub static _PATH_BSHELL: AtomicPtr<i8> = AtomicPtr::new(std::ptr::null_mut());
|
||||
extern "C" {
|
||||
pub fn C_PATH_BSHELL() -> *const i8;
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub static _PC_CASE_SENSITIVE: Lazy<c_int> = Lazy::new(|| unsafe { C_PC_CASE_SENSITIVE() });
|
||||
extern "C" {
|
||||
fn C_PC_CASE_SENSITIVE() -> c_int;
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
fn C_MB_CUR_MAX() -> usize;
|
||||
fn C_ST_LOCAL() -> u64;
|
||||
fn C_MNT_LOCAL() -> u64;
|
||||
fn C_CS_PATH() -> i32;
|
||||
pub(crate) fn confstr(
|
||||
name: libc::c_int,
|
||||
buf: *mut libc::c_char,
|
||||
len: libc::size_t,
|
||||
) -> libc::size_t;
|
||||
pub fn C_PATH_BSHELL() -> *const i8;
|
||||
fn C_PC_CASE_SENSITIVE() -> c_int;
|
||||
pub fn C_O_EXLOCK() -> c_int;
|
||||
pub fn stdout_stream() -> *mut libc::FILE;
|
||||
pub fn UVAR_FILE_SET_MTIME_HACK() -> bool;
|
||||
|
|
|
@ -32,6 +32,7 @@ mod ast;
|
|||
mod autoload;
|
||||
mod builtins;
|
||||
mod color;
|
||||
#[allow(non_snake_case)]
|
||||
mod compat;
|
||||
mod complete;
|
||||
mod curses;
|
||||
|
|
Loading…
Reference in New Issue
Block a user