rollup merge of #24376: lambdaburrito/master

Values for `_SC_*` are not the same value between `macos` and `linux` so I've added specific target constants for Mac OS X and added `_SC_NPROCESSORS_ONLN` for `linux` and `macos`.

Closes #24374
This commit is contained in:
Alex Crichton 2015-04-14 10:55:48 -07:00
commit 263314e569

View File

@ -3344,6 +3344,8 @@ pub mod posix01 {
pub const _SC_XOPEN_REALTIME : c_int = 130;
pub const _SC_XOPEN_REALTIME_THREADS : c_int = 131;
pub const PTHREAD_CREATE_JOINABLE: c_int = 0;
pub const PTHREAD_CREATE_DETACHED: c_int = 1;
@ -3727,12 +3729,14 @@ pub mod sysconf {
pub const _SC_2_FORT_RUN : c_int = 50;
pub const _SC_2_SW_DEV : c_int = 51;
pub const _SC_2_LOCALEDEF : c_int = 52;
pub const _SC_NPROCESSORS_ONLN : c_int = 84;
pub const _SC_2_CHAR_TERM : c_int = 95;
pub const _SC_2_C_VERSION : c_int = 96;
pub const _SC_2_UPE : c_int = 97;
pub const _SC_XBS5_ILP32_OFF32 : c_int = 125;
pub const _SC_XBS5_ILP32_OFFBIG : c_int = 126;
pub const _SC_XBS5_LPBIG_OFFBIG : c_int = 128;
}
#[cfg(target_os = "nacl")]
pub mod sysconf {
@ -3742,6 +3746,13 @@ pub mod sysconf {
pub static _SC_NPROCESSORS_ONLN : c_int = 1;
pub static _SC_PAGESIZE : c_int = 2;
}
#[cfg(target_os = "macos")]
pub mod sysconf {
use types::os::arch::c95::c_int;
pub static _SC_NPROCESSORS_ONLN : c_int = 58;
}
#[cfg(target_os = "android")]
pub mod sysconf {
use types::os::arch::c95::c_int;