Auto merge of #2052 - Amanieu:fix_rustc_musl, r=JohnTitor
Don't mark musl's time_t as deprecated in rustc build This allows rustc to use the latest version of the libc crate.
This commit is contained in:
commit
ab5aa27d25
|
@ -125,7 +125,8 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
|
||||||
if line.len() > 80 {
|
if line.len() > 80 {
|
||||||
err.error(path, i, "line longer than 80 chars");
|
err.error(path, i, "line longer than 80 chars");
|
||||||
}
|
}
|
||||||
if line.contains("#[cfg(") && !line.contains(" if ")
|
// This doesn't work any more due to rustfmt changes
|
||||||
|
/*if line.contains("#[cfg(") && !line.contains(" if ")
|
||||||
&& !(line.contains("target_endian") ||
|
&& !(line.contains("target_endian") ||
|
||||||
line.contains("target_arch"))
|
line.contains("target_arch"))
|
||||||
{
|
{
|
||||||
|
@ -133,11 +134,12 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
|
||||||
err.error(path, i, "use cfg_if! and submodules \
|
err.error(path, i, "use cfg_if! and submodules \
|
||||||
instead of #[cfg]");
|
instead of #[cfg]");
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) {
|
if line.contains("#[derive(") && (line.contains("Copy") || line.contains("Clone")) {
|
||||||
err.error(path, i, "impl ::Copy and ::Clone manually");
|
err.error(path, i, "impl ::Copy and ::Clone manually");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let orig_line = line;
|
||||||
let line = line.trim_start();
|
let line = line.trim_start();
|
||||||
let is_pub = line.starts_with("pub ");
|
let is_pub = line.starts_with("pub ");
|
||||||
let line = if is_pub {&line[4..]} else {line};
|
let line = if is_pub {&line[4..]} else {line};
|
||||||
|
@ -161,7 +163,7 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) {
|
||||||
} else if line.starts_with("f! {") {
|
} else if line.starts_with("f! {") {
|
||||||
f_macros += 1;
|
f_macros += 1;
|
||||||
State::FunctionDefinitions
|
State::FunctionDefinitions
|
||||||
} else if line.starts_with("extern ") {
|
} else if line.starts_with("extern ") && !orig_line.starts_with(" ") {
|
||||||
State::Functions
|
State::Functions
|
||||||
} else if line.starts_with("mod ") {
|
} else if line.starts_with("mod ") {
|
||||||
State::Modules
|
State::Modules
|
||||||
|
|
32
src/psp.rs
32
src/psp.rs
|
@ -88,14 +88,12 @@ pub type SceMpegRingbufferCb = ::Option<
|
||||||
>;
|
>;
|
||||||
|
|
||||||
pub type GuCallback = ::Option<extern "C" fn(id: i32, arg: *mut c_void)>;
|
pub type GuCallback = ::Option<extern "C" fn(id: i32, arg: *mut c_void)>;
|
||||||
pub type GuSwapBuffersCallback = ::Option<extern "C" fn(
|
pub type GuSwapBuffersCallback = ::Option<
|
||||||
display: *mut *mut c_void, render: *mut *mut c_void
|
extern "C" fn(display: *mut *mut c_void, render: *mut *mut c_void),
|
||||||
),
|
|
||||||
>;
|
>;
|
||||||
|
|
||||||
pub type SceNetAdhocctlHandler = ::Option<unsafe extern "C" fn(
|
pub type SceNetAdhocctlHandler = ::Option<
|
||||||
flag: i32, error: i32, unknown: *mut c_void
|
unsafe extern "C" fn(flag: i32, error: i32, unknown: *mut c_void),
|
||||||
),
|
|
||||||
>;
|
>;
|
||||||
|
|
||||||
pub type AdhocMatchingCallback = ::Option<
|
pub type AdhocMatchingCallback = ::Option<
|
||||||
|
@ -2794,7 +2792,7 @@ extern "C" {
|
||||||
pub fn sceCtrlPeekLatch(latch_data: *mut SceCtrlLatch) -> i32;
|
pub fn sceCtrlPeekLatch(latch_data: *mut SceCtrlLatch) -> i32;
|
||||||
pub fn sceCtrlReadLatch(latch_data: *mut SceCtrlLatch) -> i32;
|
pub fn sceCtrlReadLatch(latch_data: *mut SceCtrlLatch) -> i32;
|
||||||
pub fn sceCtrlSetIdleCancelThreshold(idlereset: i32, idleback: i32)
|
pub fn sceCtrlSetIdleCancelThreshold(idlereset: i32, idleback: i32)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceCtrlGetIdleCancelThreshold(
|
pub fn sceCtrlGetIdleCancelThreshold(
|
||||||
idlereset: *mut i32,
|
idlereset: *mut i32,
|
||||||
idleback: *mut i32,
|
idleback: *mut i32,
|
||||||
|
@ -3163,7 +3161,7 @@ extern "C" {
|
||||||
timeout: *mut u32,
|
timeout: *mut u32,
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceKernelPollMbx(mbx_id: SceUid, pmessage: *mut *mut c_void)
|
pub fn sceKernelPollMbx(mbx_id: SceUid, pmessage: *mut *mut c_void)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceKernelCancelReceiveMbx(mbx_id: SceUid, num: *mut i32) -> i32;
|
pub fn sceKernelCancelReceiveMbx(mbx_id: SceUid, num: *mut i32) -> i32;
|
||||||
pub fn sceKernelReferMbxStatus(
|
pub fn sceKernelReferMbxStatus(
|
||||||
mbx_id: SceUid,
|
mbx_id: SceUid,
|
||||||
|
@ -3321,7 +3319,7 @@ extern "C" {
|
||||||
timeout: *mut u32,
|
timeout: *mut u32,
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceKernelTryAllocateFpl(uid: SceUid, data: *mut *mut c_void)
|
pub fn sceKernelTryAllocateFpl(uid: SceUid, data: *mut *mut c_void)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceKernelFreeFpl(uid: SceUid, data: *mut c_void) -> i32;
|
pub fn sceKernelFreeFpl(uid: SceUid, data: *mut c_void) -> i32;
|
||||||
pub fn sceKernelCancelFpl(uid: SceUid, pnum: *mut i32) -> i32;
|
pub fn sceKernelCancelFpl(uid: SceUid, pnum: *mut i32) -> i32;
|
||||||
pub fn sceKernelReferFplStatus(
|
pub fn sceKernelReferFplStatus(
|
||||||
|
@ -3574,10 +3572,12 @@ extern "C" {
|
||||||
num_years: u64,
|
num_years: u64,
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceRtcSetTime_t(date: *mut ScePspDateTime, time: u32) -> i32;
|
pub fn sceRtcSetTime_t(date: *mut ScePspDateTime, time: u32) -> i32;
|
||||||
pub fn sceRtcGetTime_t(date: *const ScePspDateTime, time: *mut u32) -> i32;
|
pub fn sceRtcGetTime_t(date: *const ScePspDateTime, time: *mut u32)
|
||||||
|
-> i32;
|
||||||
pub fn sceRtcSetTime64_t(date: *mut ScePspDateTime, time: u64) -> i32;
|
pub fn sceRtcSetTime64_t(date: *mut ScePspDateTime, time: u64) -> i32;
|
||||||
pub fn sceRtcGetTime64_t(
|
pub fn sceRtcGetTime64_t(
|
||||||
date: *const ScePspDateTime, time: *mut u64
|
date: *const ScePspDateTime,
|
||||||
|
time: *mut u64,
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceRtcSetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
|
pub fn sceRtcSetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
|
||||||
pub fn sceRtcGetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
|
pub fn sceRtcGetDosTime(date: *mut ScePspDateTime, dos_time: u32) -> i32;
|
||||||
|
@ -3636,7 +3636,7 @@ extern "C" {
|
||||||
pub fn sceIoLseekAsync(fd: SceUid, offset: i64, whence: IoWhence) -> i32;
|
pub fn sceIoLseekAsync(fd: SceUid, offset: i64, whence: IoWhence) -> i32;
|
||||||
pub fn sceIoLseek32(fd: SceUid, offset: i32, whence: IoWhence) -> i32;
|
pub fn sceIoLseek32(fd: SceUid, offset: i32, whence: IoWhence) -> i32;
|
||||||
pub fn sceIoLseek32Async(fd: SceUid, offset: i32, whence: IoWhence)
|
pub fn sceIoLseek32Async(fd: SceUid, offset: i32, whence: IoWhence)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceIoRemove(file: *const u8) -> i32;
|
pub fn sceIoRemove(file: *const u8) -> i32;
|
||||||
pub fn sceIoMkdir(dir: *const u8, mode: IoPermissions) -> i32;
|
pub fn sceIoMkdir(dir: *const u8, mode: IoPermissions) -> i32;
|
||||||
pub fn sceIoRmdir(path: *const u8) -> i32;
|
pub fn sceIoRmdir(path: *const u8) -> i32;
|
||||||
|
@ -4173,7 +4173,7 @@ extern "C" {
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceRegGetKeysNum(dir_handle: RegHandle, num: *mut i32) -> i32;
|
pub fn sceRegGetKeysNum(dir_handle: RegHandle, num: *mut i32) -> i32;
|
||||||
pub fn sceRegGetKeys(dir_handle: RegHandle, buf: *mut u8, num: i32)
|
pub fn sceRegGetKeys(dir_handle: RegHandle, buf: *mut u8, num: i32)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceRegCreateKey(
|
pub fn sceRegCreateKey(
|
||||||
dir_handle: RegHandle,
|
dir_handle: RegHandle,
|
||||||
name: *const u8,
|
name: *const u8,
|
||||||
|
@ -4315,7 +4315,7 @@ extern "C" {
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceNetAdhocctlDelHandler(id: i32) -> i32;
|
pub fn sceNetAdhocctlDelHandler(id: i32) -> i32;
|
||||||
pub fn sceNetAdhocctlGetNameByAddr(mac: *mut u8, nickname: *mut u8)
|
pub fn sceNetAdhocctlGetNameByAddr(mac: *mut u8, nickname: *mut u8)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceNetAdhocctlGetAddrByName(
|
pub fn sceNetAdhocctlGetAddrByName(
|
||||||
nickname: *mut u8,
|
nickname: *mut u8,
|
||||||
length: *mut i32,
|
length: *mut i32,
|
||||||
|
@ -4486,7 +4486,7 @@ extern "C" {
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceNetAdhocMatchingGetPoolMaxAlloc() -> i32;
|
pub fn sceNetAdhocMatchingGetPoolMaxAlloc() -> i32;
|
||||||
pub fn sceNetAdhocMatchingGetPoolStat(poolstat: *mut AdhocPoolStat)
|
pub fn sceNetAdhocMatchingGetPoolStat(poolstat: *mut AdhocPoolStat)
|
||||||
-> i32;
|
-> i32;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -4625,7 +4625,7 @@ extern "C" {
|
||||||
content_length: *mut u64,
|
content_length: *mut u64,
|
||||||
) -> i32;
|
) -> i32;
|
||||||
pub fn sceHttpGetStatusCode(request_id: i32, status_code: *mut i32)
|
pub fn sceHttpGetStatusCode(request_id: i32, status_code: *mut i32)
|
||||||
-> i32;
|
-> i32;
|
||||||
pub fn sceHttpSetResolveTimeOut(id: i32, timeout: u32) -> i32;
|
pub fn sceHttpSetResolveTimeOut(id: i32, timeout: u32) -> i32;
|
||||||
pub fn sceHttpSetResolveRetry(id: i32, count: i32) -> i32;
|
pub fn sceHttpSetResolveRetry(id: i32, count: i32) -> i32;
|
||||||
pub fn sceHttpSetConnectTimeOut(id: i32, timeout: u32) -> i32;
|
pub fn sceHttpSetConnectTimeOut(id: i32, timeout: u32) -> i32;
|
||||||
|
|
|
@ -634,8 +634,8 @@ extern "C" {
|
||||||
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", not(target_arch = "aarch64")),
|
all(target_os = "macos", not(target_arch = "aarch64")),
|
||||||
link_name = "glob$INODE64")
|
link_name = "glob$INODE64"
|
||||||
]
|
)]
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__glob30")]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "freebsd", any(freebsd11, freebsd10)),
|
all(target_os = "freebsd", any(freebsd11, freebsd10)),
|
||||||
|
@ -869,10 +869,7 @@ extern "C" {
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "getitimer$UNIX2003"
|
link_name = "getitimer$UNIX2003"
|
||||||
)]
|
)]
|
||||||
pub fn getitimer(
|
pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int;
|
||||||
which: ::c_int,
|
|
||||||
curr_value: *mut ::itimerval
|
|
||||||
) -> ::c_int;
|
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "setitimer$UNIX2003"
|
link_name = "setitimer$UNIX2003"
|
||||||
|
|
|
@ -212,7 +212,7 @@ pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const SOL_SOCKET: ::c_int = 1;
|
pub const SOL_SOCKET: ::c_int = 1;
|
||||||
|
|
||||||
|
|
|
@ -213,7 +213,7 @@ pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const SOL_SOCKET: ::c_int = 1;
|
pub const SOL_SOCKET: ::c_int = 1;
|
||||||
|
|
||||||
|
|
|
@ -417,7 +417,7 @@ pub const MAP_EXECUTABLE: ::c_int = 4096;
|
||||||
pub const MAP_POPULATE: ::c_int = 32768;
|
pub const MAP_POPULATE: ::c_int = 32768;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 65536;
|
pub const MAP_NONBLOCK: ::c_int = 65536;
|
||||||
pub const MAP_STACK: ::c_int = 131072;
|
pub const MAP_STACK: ::c_int = 131072;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
pub const EDEADLOCK: ::c_int = 35;
|
pub const EDEADLOCK: ::c_int = 35;
|
||||||
pub const EUCLEAN: ::c_int = 117;
|
pub const EUCLEAN: ::c_int = 117;
|
||||||
pub const ENOTNAM: ::c_int = 118;
|
pub const ENOTNAM: ::c_int = 118;
|
||||||
|
|
|
@ -239,7 +239,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const EDEADLK: ::c_int = 78;
|
pub const EDEADLK: ::c_int = 78;
|
||||||
pub const ENAMETOOLONG: ::c_int = 63;
|
pub const ENAMETOOLONG: ::c_int = 63;
|
||||||
|
|
|
@ -416,7 +416,7 @@ pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
pub const MAP_GROWSDOWN: ::c_int = 0x0100;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const EDEADLOCK: ::c_int = 35;
|
pub const EDEADLOCK: ::c_int = 35;
|
||||||
pub const EUCLEAN: ::c_int = 117;
|
pub const EUCLEAN: ::c_int = 117;
|
||||||
|
|
|
@ -552,7 +552,7 @@ pub const O_DIRECT: ::c_int = 0x20000;
|
||||||
|
|
||||||
pub const MAP_LOCKED: ::c_int = 0x00080;
|
pub const MAP_LOCKED: ::c_int = 0x00080;
|
||||||
pub const MAP_NORESERVE: ::c_int = 0x00040;
|
pub const MAP_NORESERVE: ::c_int = 0x00040;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const EDEADLOCK: ::c_int = 58;
|
pub const EDEADLOCK: ::c_int = 58;
|
||||||
pub const EUCLEAN: ::c_int = 117;
|
pub const EUCLEAN: ::c_int = 117;
|
||||||
|
|
|
@ -463,7 +463,7 @@ pub const MAP_EXECUTABLE: ::c_int = 4096;
|
||||||
pub const MAP_POPULATE: ::c_int = 32768;
|
pub const MAP_POPULATE: ::c_int = 32768;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 65536;
|
pub const MAP_NONBLOCK: ::c_int = 65536;
|
||||||
pub const MAP_STACK: ::c_int = 131072;
|
pub const MAP_STACK: ::c_int = 131072;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
pub const EDEADLOCK: ::c_int = 35;
|
pub const EDEADLOCK: ::c_int = 35;
|
||||||
pub const EUCLEAN: ::c_int = 117;
|
pub const EUCLEAN: ::c_int = 117;
|
||||||
pub const ENOTNAM: ::c_int = 118;
|
pub const ENOTNAM: ::c_int = 118;
|
||||||
|
|
|
@ -247,7 +247,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const EDEADLK: ::c_int = 78;
|
pub const EDEADLK: ::c_int = 78;
|
||||||
pub const ENAMETOOLONG: ::c_int = 63;
|
pub const ENAMETOOLONG: ::c_int = 63;
|
||||||
|
|
|
@ -720,7 +720,7 @@ pub const MAP_EXECUTABLE: ::c_int = 0x01000;
|
||||||
pub const MAP_POPULATE: ::c_int = 0x08000;
|
pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const EDEADLOCK: ::c_int = 35;
|
pub const EDEADLOCK: ::c_int = 35;
|
||||||
pub const EUCLEAN: ::c_int = 117;
|
pub const EUCLEAN: ::c_int = 117;
|
||||||
|
|
|
@ -475,20 +475,20 @@ cfg_if! {
|
||||||
|
|
||||||
// include/uapi/asm-generic/hugetlb_encode.h
|
// include/uapi/asm-generic/hugetlb_encode.h
|
||||||
pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
|
pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26;
|
||||||
pub const HUGETLB_FLAG_ENCODE_MASK: ::c_int = 0x3f;
|
pub const HUGETLB_FLAG_ENCODE_MASK: ::c_int = 0x3f;
|
||||||
|
|
||||||
pub const HUGETLB_FLAG_ENCODE_64KB: ::c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_64KB: ::c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_512KB: ::c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_512KB: ::c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_1MB: ::c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_1MB: ::c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_2MB: ::c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_2MB: ::c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_8MB: ::c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_8MB: ::c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_16MB: ::c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_16MB: ::c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_32MB: ::c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_32MB: ::c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_256MB: ::c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_256MB: ::c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_512MB: ::c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_512MB: ::c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_1GB: ::c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_1GB: ::c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_2GB: ::c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_2GB: ::c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
|
|
||||||
// include/uapi/linux/mman.h
|
// include/uapi/linux/mman.h
|
||||||
/*
|
/*
|
||||||
|
@ -499,20 +499,20 @@ pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
* the running system. See mmap(2) man page for details.
|
* the running system. See mmap(2) man page for details.
|
||||||
*/
|
*/
|
||||||
pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;
|
pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT;
|
||||||
pub const MAP_HUGE_MASK: ::c_int = HUGETLB_FLAG_ENCODE_MASK;
|
pub const MAP_HUGE_MASK: ::c_int = HUGETLB_FLAG_ENCODE_MASK;
|
||||||
|
|
||||||
pub const MAP_HUGE_64KB: ::c_int = HUGETLB_FLAG_ENCODE_64KB;
|
pub const MAP_HUGE_64KB: ::c_int = HUGETLB_FLAG_ENCODE_64KB;
|
||||||
pub const MAP_HUGE_512KB: ::c_int = HUGETLB_FLAG_ENCODE_512KB;
|
pub const MAP_HUGE_512KB: ::c_int = HUGETLB_FLAG_ENCODE_512KB;
|
||||||
pub const MAP_HUGE_1MB: ::c_int = HUGETLB_FLAG_ENCODE_1MB;
|
pub const MAP_HUGE_1MB: ::c_int = HUGETLB_FLAG_ENCODE_1MB;
|
||||||
pub const MAP_HUGE_2MB: ::c_int = HUGETLB_FLAG_ENCODE_2MB;
|
pub const MAP_HUGE_2MB: ::c_int = HUGETLB_FLAG_ENCODE_2MB;
|
||||||
pub const MAP_HUGE_8MB: ::c_int = HUGETLB_FLAG_ENCODE_8MB;
|
pub const MAP_HUGE_8MB: ::c_int = HUGETLB_FLAG_ENCODE_8MB;
|
||||||
pub const MAP_HUGE_16MB: ::c_int = HUGETLB_FLAG_ENCODE_16MB;
|
pub const MAP_HUGE_16MB: ::c_int = HUGETLB_FLAG_ENCODE_16MB;
|
||||||
pub const MAP_HUGE_32MB: ::c_int = HUGETLB_FLAG_ENCODE_32MB;
|
pub const MAP_HUGE_32MB: ::c_int = HUGETLB_FLAG_ENCODE_32MB;
|
||||||
pub const MAP_HUGE_256MB: ::c_int = HUGETLB_FLAG_ENCODE_256MB;
|
pub const MAP_HUGE_256MB: ::c_int = HUGETLB_FLAG_ENCODE_256MB;
|
||||||
pub const MAP_HUGE_512MB: ::c_int = HUGETLB_FLAG_ENCODE_512MB;
|
pub const MAP_HUGE_512MB: ::c_int = HUGETLB_FLAG_ENCODE_512MB;
|
||||||
pub const MAP_HUGE_1GB: ::c_int = HUGETLB_FLAG_ENCODE_1GB;
|
pub const MAP_HUGE_1GB: ::c_int = HUGETLB_FLAG_ENCODE_1GB;
|
||||||
pub const MAP_HUGE_2GB: ::c_int = HUGETLB_FLAG_ENCODE_2GB;
|
pub const MAP_HUGE_2GB: ::c_int = HUGETLB_FLAG_ENCODE_2GB;
|
||||||
pub const MAP_HUGE_16GB: ::c_int = HUGETLB_FLAG_ENCODE_16GB;
|
pub const MAP_HUGE_16GB: ::c_int = HUGETLB_FLAG_ENCODE_16GB;
|
||||||
|
|
||||||
pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
|
pub const RLIMIT_CPU: ::__rlimit_resource_t = 0;
|
||||||
pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
|
pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1;
|
||||||
|
|
|
@ -262,7 +262,7 @@ pub const MAP_NORESERVE: ::c_int = 0x04000;
|
||||||
pub const MAP_POPULATE: ::c_int = 0x08000;
|
pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const SOCK_STREAM: ::c_int = 1;
|
pub const SOCK_STREAM: ::c_int = 1;
|
||||||
pub const SOCK_DGRAM: ::c_int = 2;
|
pub const SOCK_DGRAM: ::c_int = 2;
|
||||||
|
|
|
@ -322,7 +322,7 @@ pub const MAP_NORESERVE: ::c_int = 0x04000;
|
||||||
pub const MAP_POPULATE: ::c_int = 0x08000;
|
pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const SOCK_STREAM: ::c_int = 1;
|
pub const SOCK_STREAM: ::c_int = 1;
|
||||||
pub const SOCK_DGRAM: ::c_int = 2;
|
pub const SOCK_DGRAM: ::c_int = 2;
|
||||||
|
|
|
@ -170,7 +170,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const SOCK_STREAM: ::c_int = 1;
|
pub const SOCK_STREAM: ::c_int = 1;
|
||||||
pub const SOCK_DGRAM: ::c_int = 2;
|
pub const SOCK_DGRAM: ::c_int = 2;
|
||||||
|
|
|
@ -819,7 +819,7 @@ pub const MAP_POPULATE: ::c_int = 0x08000;
|
||||||
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
pub const MAP_NONBLOCK: ::c_int = 0x010000;
|
||||||
pub const MAP_STACK: ::c_int = 0x020000;
|
pub const MAP_STACK: ::c_int = 0x020000;
|
||||||
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
pub const MAP_HUGETLB: ::c_int = 0x040000;
|
||||||
pub const MAP_SYNC : ::c_int = 0x080000;
|
pub const MAP_SYNC: ::c_int = 0x080000;
|
||||||
|
|
||||||
pub const RLIMIT_NLIMITS: ::c_int = 15;
|
pub const RLIMIT_NLIMITS: ::c_int = 15;
|
||||||
pub const TIOCINQ: ::c_int = ::FIONREAD;
|
pub const TIOCINQ: ::c_int = ::FIONREAD;
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
pub type pthread_t = *mut ::c_void;
|
pub type pthread_t = *mut ::c_void;
|
||||||
pub type clock_t = c_long;
|
pub type clock_t = c_long;
|
||||||
#[deprecated(
|
#[cfg_attr(
|
||||||
since = "0.2.80",
|
not(feature = "rustc-dep-of-std"),
|
||||||
note = "This type is changed to 64-bit in musl 1.2.0, \
|
deprecated(
|
||||||
we'll follow that change in the future release. \
|
since = "0.2.80",
|
||||||
See #1848 for more info."
|
note = "This type is changed to 64-bit in musl 1.2.0, \
|
||||||
|
we'll follow that change in the future release. \
|
||||||
|
See #1848 for more info."
|
||||||
|
)
|
||||||
)]
|
)]
|
||||||
pub type time_t = c_long;
|
pub type time_t = c_long;
|
||||||
pub type suseconds_t = c_long;
|
pub type suseconds_t = c_long;
|
||||||
|
@ -424,20 +427,20 @@ cfg_if! {
|
||||||
* the running system. See mmap(2) man page for details.
|
* the running system. See mmap(2) man page for details.
|
||||||
*/
|
*/
|
||||||
pub const MAP_HUGE_SHIFT: ::c_int = 26;
|
pub const MAP_HUGE_SHIFT: ::c_int = 26;
|
||||||
pub const MAP_HUGE_MASK: ::c_int = 0x3f;
|
pub const MAP_HUGE_MASK: ::c_int = 0x3f;
|
||||||
|
|
||||||
pub const MAP_HUGE_64KB: ::c_int = 16 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_64KB: ::c_int = 16 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_512KB: ::c_int = 19 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_512KB: ::c_int = 19 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_1MB: ::c_int = 20 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_1MB: ::c_int = 20 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_2MB: ::c_int = 21 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_2MB: ::c_int = 21 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_8MB: ::c_int = 23 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_8MB: ::c_int = 23 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_16MB: ::c_int = 24 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_16MB: ::c_int = 24 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_32MB: ::c_int = 25 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_32MB: ::c_int = 25 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_256MB: ::c_int = 28 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_256MB: ::c_int = 28 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_512MB: ::c_int = 29 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_512MB: ::c_int = 29 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_1GB: ::c_int = 30 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_1GB: ::c_int = 30 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_2GB: ::c_int = 31 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_2GB: ::c_int = 31 << MAP_HUGE_SHIFT;
|
||||||
pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT;
|
pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT;
|
||||||
|
|
||||||
pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
|
pub const MS_RMT_MASK: ::c_ulong = 0x02800051;
|
||||||
|
|
||||||
|
|
|
@ -636,13 +636,19 @@ extern "C" {
|
||||||
pub fn getchar_unlocked() -> ::c_int;
|
pub fn getchar_unlocked() -> ::c_int;
|
||||||
pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
|
pub fn putchar_unlocked(c: ::c_int) -> ::c_int;
|
||||||
|
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__socket30")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__socket30")]
|
||||||
#[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")]
|
#[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")]
|
||||||
pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
|
pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "connect$UNIX2003"
|
link_name = "connect$UNIX2003"
|
||||||
|
@ -658,8 +664,11 @@ extern "C" {
|
||||||
link_name = "listen$UNIX2003"
|
link_name = "listen$UNIX2003"
|
||||||
)]
|
)]
|
||||||
pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
|
pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "accept$UNIX2003"
|
link_name = "accept$UNIX2003"
|
||||||
|
@ -669,8 +678,11 @@ extern "C" {
|
||||||
address: *mut sockaddr,
|
address: *mut sockaddr,
|
||||||
address_len: *mut socklen_t,
|
address_len: *mut socklen_t,
|
||||||
) -> ::c_int;
|
) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "getpeername$UNIX2003"
|
link_name = "getpeername$UNIX2003"
|
||||||
|
@ -680,8 +692,11 @@ extern "C" {
|
||||||
address: *mut sockaddr,
|
address: *mut sockaddr,
|
||||||
address_len: *mut socklen_t,
|
address_len: *mut socklen_t,
|
||||||
) -> ::c_int;
|
) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "getsockname$UNIX2003"
|
link_name = "getsockname$UNIX2003"
|
||||||
|
@ -709,8 +724,11 @@ extern "C" {
|
||||||
protocol: ::c_int,
|
protocol: ::c_int,
|
||||||
socket_vector: *mut ::c_int,
|
socket_vector: *mut ::c_int,
|
||||||
) -> ::c_int;
|
) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "sendto$UNIX2003"
|
link_name = "sendto$UNIX2003"
|
||||||
|
@ -1286,8 +1304,11 @@ extern "C" {
|
||||||
pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
|
pub fn dlclose(handle: *mut ::c_void) -> ::c_int;
|
||||||
pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
|
pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int;
|
||||||
|
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
#[cfg_attr(target_os = "illumos", link_name = "__xnet_getaddrinfo")]
|
#[cfg_attr(target_os = "illumos", link_name = "__xnet_getaddrinfo")]
|
||||||
pub fn getaddrinfo(
|
pub fn getaddrinfo(
|
||||||
node: *const c_char,
|
node: *const c_char,
|
||||||
|
@ -1295,8 +1316,11 @@ extern "C" {
|
||||||
hints: *const addrinfo,
|
hints: *const addrinfo,
|
||||||
res: *mut *mut addrinfo,
|
res: *mut *mut addrinfo,
|
||||||
) -> ::c_int;
|
) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
pub fn freeaddrinfo(res: *mut addrinfo);
|
pub fn freeaddrinfo(res: *mut addrinfo);
|
||||||
pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
|
pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char;
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -1315,32 +1339,40 @@ extern "C" {
|
||||||
pub fn res_init() -> ::c_int;
|
pub fn res_init() -> ::c_int;
|
||||||
|
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
|
pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__localtime_r50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
|
pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm;
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
all(target_os = "macos", target_arch = "x86"),
|
all(target_os = "macos", target_arch = "x86"),
|
||||||
link_name = "mktime$UNIX2003"
|
link_name = "mktime$UNIX2003"
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__mktime50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn mktime(tm: *mut tm) -> time_t;
|
pub fn mktime(tm: *mut tm) -> time_t;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__time50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__time50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn time(time: *mut time_t) -> time_t;
|
pub fn time(time: *mut time_t) -> time_t;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__gmtime50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn gmtime(time_p: *const time_t) -> *mut tm;
|
pub fn gmtime(time_p: *const time_t) -> *mut tm;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__locatime50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn localtime(time_p: *const time_t) -> *mut tm;
|
pub fn localtime(time_p: *const time_t) -> *mut tm;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__difftime50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__difftime50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn difftime(time1: time_t, time0: time_t) -> ::c_double;
|
pub fn difftime(time1: time_t, time0: time_t) -> ::c_double;
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__timegm50")]
|
||||||
#[cfg_attr(target_env = "musl", allow(deprecated))] // FIXME: for `time_t`
|
#[cfg_attr(target_env = "musl", allow(deprecated))]
|
||||||
|
// FIXME: for `time_t`
|
||||||
pub fn timegm(tm: *mut ::tm) -> time_t;
|
pub fn timegm(tm: *mut ::tm) -> time_t;
|
||||||
|
|
||||||
#[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
|
#[cfg_attr(target_os = "netbsd", link_name = "__mknod50")]
|
||||||
|
@ -1537,11 +1569,7 @@ extern "C" {
|
||||||
stream: *mut FILE,
|
stream: *mut FILE,
|
||||||
) -> ssize_t;
|
) -> ssize_t;
|
||||||
|
|
||||||
pub fn lockf(
|
pub fn lockf(fd: ::c_int, cmd: ::c_int, len: ::off_t) -> ::c_int;
|
||||||
fd: ::c_int,
|
|
||||||
cmd: ::c_int,
|
|
||||||
len: ::off_t,
|
|
||||||
) -> ::c_int;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
|
|
|
@ -602,8 +602,11 @@ extern "C" {
|
||||||
pub fn rand() -> ::c_int;
|
pub fn rand() -> ::c_int;
|
||||||
pub fn srand(seed: ::c_uint);
|
pub fn srand(seed: ::c_uint);
|
||||||
|
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t)
|
pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t)
|
||||||
-> ::c_int;
|
-> ::c_int;
|
||||||
pub fn clock_settime(
|
pub fn clock_settime(
|
||||||
|
@ -620,8 +623,11 @@ extern "C" {
|
||||||
) -> ::c_int;
|
) -> ::c_int;
|
||||||
pub fn closesocket(sockfd: ::c_int) -> ::c_int;
|
pub fn closesocket(sockfd: ::c_int) -> ::c_int;
|
||||||
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
|
pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
pub fn recvfrom(
|
pub fn recvfrom(
|
||||||
fd: ::c_int,
|
fd: ::c_int,
|
||||||
buf: *mut ::c_void,
|
buf: *mut ::c_void,
|
||||||
|
@ -630,8 +636,11 @@ extern "C" {
|
||||||
addr: *mut sockaddr,
|
addr: *mut sockaddr,
|
||||||
addr_len: *mut socklen_t,
|
addr_len: *mut socklen_t,
|
||||||
) -> isize;
|
) -> isize;
|
||||||
#[cfg(not(all(libc_cfg_target_vendor, target_arch = "powerpc",
|
#[cfg(not(all(
|
||||||
target_vendor = "nintendo")))]
|
libc_cfg_target_vendor,
|
||||||
|
target_arch = "powerpc",
|
||||||
|
target_vendor = "nintendo"
|
||||||
|
)))]
|
||||||
pub fn getnameinfo(
|
pub fn getnameinfo(
|
||||||
sa: *const sockaddr,
|
sa: *const sockaddr,
|
||||||
salen: socklen_t,
|
salen: socklen_t,
|
||||||
|
|
Loading…
Reference in New Issue