Skip to content

Commit 2a46976

Browse files
committed
Move the SC constants for macos to an accessible module (fixes rust-lang#24374 for mac).
These constants were added in 6f54ce9 and e8fbd1c to a consts module that is behind a gate. I have not confirmed that these constants do indeed work on either OSX or iOS.
1 parent 6517a0e commit 2a46976

File tree

1 file changed

+72
-133
lines changed

1 file changed

+72
-133
lines changed

src/liblibc/lib.rs

+72-133
Original file line numberDiff line numberDiff line change
@@ -3779,139 +3779,6 @@ pub mod consts {
37793779
pub static _SC_PAGESIZE : c_int = 2;
37803780
}
37813781

3782-
#[cfg(target_os = "macos")]
3783-
pub mod sysconf {
3784-
use types::os::arch::c95::c_int;
3785-
pub static _SC_ARG_MAX : c_int = 1;
3786-
pub static _SC_CHILD_MAX : c_int = 2;
3787-
pub static _SC_CLK_TCK : c_int = 3;
3788-
pub static _SC_NGROUPS_MAX : c_int = 4;
3789-
pub static _SC_OPEN_MAX : c_int = 5;
3790-
pub static _SC_JOB_CONTROL : c_int = 6;
3791-
pub static _SC_SAVED_IDS : c_int = 7;
3792-
pub static _SC_VERSION : c_int = 8;
3793-
pub static _SC_BC_BASE_MAX : c_int = 9;
3794-
pub static _SC_BC_DIM_MAX : c_int = 10;
3795-
pub static _SC_BC_SCALE_MAX : c_int = 11;
3796-
pub static _SC_BC_STRING_MAX : c_int = 12;
3797-
pub static _SC_COLL_WEIGHTS_MAX : c_int = 13;
3798-
pub static _SC_EXPR_NEST_MAX : c_int = 14;
3799-
pub static _SC_LINE_MAX : c_int = 15;
3800-
pub static _SC_RE_DUP_MAX : c_int = 16;
3801-
pub static _SC_2_VERSION : c_int = 17;
3802-
pub static _SC_2_C_BIND : c_int = 18;
3803-
pub static _SC_2_C_DEV : c_int = 19;
3804-
pub static _SC_2_CHAR_TERM : c_int = 20;
3805-
pub static _SC_2_FORT_DEV : c_int = 21;
3806-
pub static _SC_2_FORT_RUN : c_int = 22;
3807-
pub static _SC_2_LOCALEDEF : c_int = 23;
3808-
pub static _SC_2_SW_DEV : c_int = 24;
3809-
pub static _SC_2_UPE : c_int = 25;
3810-
pub static _SC_STREAM_MAX : c_int = 26;
3811-
pub static _SC_TZNAME_MAX : c_int = 27;
3812-
pub static _SC_ASYNCHRONOUS_IO : c_int = 28;
3813-
pub static _SC_PAGESIZE : c_int = 29;
3814-
pub static _SC_MEMLOCK : c_int = 30;
3815-
pub static _SC_MEMLOCK_RANGE : c_int = 31;
3816-
pub static _SC_MEMORY_PROTECTION : c_int = 32;
3817-
pub static _SC_MESSAGE_PASSING : c_int = 33;
3818-
pub static _SC_PRIORITIZED_IO : c_int = 34;
3819-
pub static _SC_PRIORITY_SCHEDULING : c_int = 35;
3820-
pub static _SC_REALTIME_SIGNALS : c_int = 36;
3821-
pub static _SC_SEMAPHORES : c_int = 37;
3822-
pub static _SC_FSYNC : c_int = 38;
3823-
pub static _SC_SHARED_MEMORY_OBJECTS : c_int = 39;
3824-
pub static _SC_SYNCHRONIZED_IO : c_int = 40;
3825-
pub static _SC_TIMERS : c_int = 41;
3826-
pub static _SC_AIO_LISTIO_MAX : c_int = 42;
3827-
pub static _SC_AIO_MAX : c_int = 43;
3828-
pub static _SC_AIO_PRIO_DELTA_MAX : c_int = 44;
3829-
pub static _SC_DELAYTIMER_MAX : c_int = 45;
3830-
pub static _SC_MQ_OPEN_MAX : c_int = 46;
3831-
pub static _SC_MAPPED_FILES : c_int = 47;
3832-
pub static _SC_RTSIG_MAX : c_int = 48;
3833-
pub static _SC_SEM_NSEMS_MAX : c_int = 49;
3834-
pub static _SC_SEM_VALUE_MAX : c_int =50;
3835-
pub static _SC_SIGQUEUE_MAX : c_int = 51;
3836-
pub static _SC_TIMER_MAX : c_int = 52;
3837-
pub static _SC_NPROCESSORS_CONF : c_int = 57;
3838-
pub static _SC_NPROCESSORS_ONLN : c_int = 58;
3839-
pub static _SC_2_PBS : c_int = 59;
3840-
pub static _SC_2_PBS_ACCOUNTING : c_int = 60;
3841-
pub static _SC_2_PBS_CHECKPOINT : c_int = 61;
3842-
pub static _SC_2_PBS_LOCATE : c_int = 62;
3843-
pub static _SC_2_PBS_MESSAGE : c_int = 63;
3844-
pub static _SC_2_PBS_TRACK : c_int = 64;
3845-
pub static _SC_ADVISORY_INFO : c_int = 65;
3846-
pub static _SC_BARRIERS : c_int = 66;
3847-
pub static _SC_CLOCK_SELECTION : c_int = 67;
3848-
pub static _SC_CPUTIME : c_int = 68;
3849-
pub static _SC_FILE_LOCKING : c_int = 69;
3850-
pub static _SC_GETGR_R_SIZE_MAX : c_int = 70;
3851-
pub static _SC_GETPW_R_SIZE_MAX : c_int = 71;
3852-
pub static _SC_HOST_NAME_MAX : c_int = 72;
3853-
pub static _SC_LOGIN_NAME_MAX : c_int = 73;
3854-
pub static _SC_MONOTONIC_CLOCK : c_int = 74;
3855-
pub static _SC_MQ_PRIO_MAX : c_int = 75;
3856-
pub static _SC_READER_WRITER_LOCKS : c_int = 76;
3857-
pub static _SC_REGEXP : c_int = 77;
3858-
pub static _SC_SHELL : c_int = 78;
3859-
pub static _SC_SPAWN : c_int = 79;
3860-
pub static _SC_SPIN_LOCKS : c_int = 80;
3861-
pub static _SC_SPORADIC_SERVER : c_int = 81;
3862-
pub static _SC_THREAD_ATTR_STACKADDR : c_int = 82;
3863-
pub static _SC_THREAD_ATTR_STACKSIZE : c_int = 83;
3864-
pub static _SC_THREAD_CPUTIME : c_int = 84;
3865-
pub static _SC_THREAD_DESTRUCTOR_ITERATIONS : c_int = 85;
3866-
pub static _SC_THREAD_KEYS_MAX : c_int = 86;
3867-
pub static _SC_THREAD_PRIO_INHERIT : c_int = 87;
3868-
pub static _SC_THREAD_PRIO_PROTECT : c_int = 88;
3869-
pub static _SC_THREAD_PRIORITY_SCHEDULING : c_int = 89;
3870-
pub static _SC_THREAD_PROCESS_SHARED : c_int = 90;
3871-
pub static _SC_THREAD_SAFE_FUNCTIONS : c_int = 91;
3872-
pub static _SC_THREAD_SPORADIC_SERVER : c_int = 92;
3873-
pub static _SC_THREAD_STACK_MIN : c_int = 93;
3874-
pub static _SC_THREAD_THREADS_MAX : c_int = 94;
3875-
pub static _SC_TIMEOUTS : c_int = 95;
3876-
pub static _SC_THREADS : c_int = 96;
3877-
pub static _SC_TRACE : c_int = 97;
3878-
pub static _SC_TRACE_EVENT_FILTER: c_int = 98;
3879-
pub static _SC_TRACE_INHERIT: c_int = 99;
3880-
pub static _SC_TRACE_LOG: c_int = 100;
3881-
pub static _SC_TTY_NAME_MAX: c_int = 101;
3882-
pub static _SC_TYPED_MEMORY_OBJECTS: c_int = 102;
3883-
pub static _SC_V6_ILP32_OFF32: c_int = 103;
3884-
pub static _SC_V6_ILP32_OFFBIG: c_int = 104;
3885-
pub static _SC_V6_LP64_OFF64: c_int = 105;
3886-
pub static _SC_V6_LPBIG_OFFBIG: c_int = 106;
3887-
pub static _SC_IPV6: c_int = 118;
3888-
pub static _SC_RAW_SOCKETS: c_int = 119;
3889-
pub static _SC_SYMLOOP_MAX: c_int = 120;
3890-
pub static _SC_ATEXIT_MAX: c_int = 107;
3891-
pub static _SC_IOV_MAX: c_int = 56;
3892-
pub static _SC_PAGE_SIZE: cint = _SC_PAGESIZE;
3893-
pub static _SC_XOPEN_CRYPT: c_int = 108;
3894-
pub static _SC_XOPEN_ENH_I18N: c_int = 109;
3895-
pub static _SC_XOPEN_LEGACY: c_int = 110;
3896-
pub static _SC_XOPEN_REALTIME: c_int = 111;
3897-
pub static _SC_XOPEN_REALTIME_THREADS: c_int = 112;
3898-
pub static _SC_XOPEN_SHM: c_int = 113;
3899-
pub static _SC_XOPEN_STREAMS: c_int = 114;
3900-
pub static _SC_XOPEN_UNIX: c_int = 115;
3901-
pub static _SC_XOPEN_VERSION: c_int = 116;
3902-
pub static _SC_XOPEN_XCU_VERSION: c_int = 121;
3903-
pub static _SC_XBS5_ILP32_OFF32: c_int = 122;
3904-
pub static _SC_XBS5_ILP32_OFFBIG: c_int = 123;
3905-
pub static _SC_XBS5_LP64_OFF64: c_int = 124;
3906-
pub static _SC_XBS5_LPBIG_OFFBIG: c_int = 125;
3907-
pub static _SC_SS_REPL_MAX: c_int = 126;
3908-
pub static _SC_TRACE_EVENT_NAME_MAX: c_int = 127;
3909-
pub static _SC_TRACE_NAME_MAX: c_int = 128;
3910-
pub static _SC_TRACE_SYS_MAX: c_int = 129;
3911-
pub static _SC_TRACE_USER_EVENT_MAX: c_int = 130;
3912-
pub static _SC_PASS_MAX: c_int = 131;
3913-
}
3914-
39153782
#[cfg(target_os = "android")]
39163783
pub mod sysconf {
39173784
use types::os::arch::c95::c_int;
@@ -5272,10 +5139,82 @@ pub mod consts {
52725139
pub const _SC_SEM_VALUE_MAX : c_int = 50;
52735140
pub const _SC_SIGQUEUE_MAX : c_int = 51;
52745141
pub const _SC_TIMER_MAX : c_int = 52;
5142+
pub const _SC_NPROCESSORS_CONF : c_int = 57;
5143+
pub const _SC_NPROCESSORS_ONLN : c_int = 58;
5144+
pub const _SC_2_PBS : c_int = 59;
5145+
pub const _SC_2_PBS_ACCOUNTING : c_int = 60;
5146+
pub const _SC_2_PBS_CHECKPOINT : c_int = 61;
5147+
pub const _SC_2_PBS_LOCATE : c_int = 62;
5148+
pub const _SC_2_PBS_MESSAGE : c_int = 63;
5149+
pub const _SC_2_PBS_TRACK : c_int = 64;
5150+
pub const _SC_ADVISORY_INFO : c_int = 65;
5151+
pub const _SC_BARRIERS : c_int = 66;
5152+
pub const _SC_CLOCK_SELECTION : c_int = 67;
5153+
pub const _SC_CPUTIME : c_int = 68;
5154+
pub const _SC_FILE_LOCKING : c_int = 69;
5155+
pub const _SC_GETGR_R_SIZE_MAX : c_int = 70;
5156+
pub const _SC_GETPW_R_SIZE_MAX : c_int = 71;
5157+
pub const _SC_HOST_NAME_MAX : c_int = 72;
5158+
pub const _SC_LOGIN_NAME_MAX : c_int = 73;
5159+
pub const _SC_MONOTONIC_CLOCK : c_int = 74;
5160+
pub const _SC_MQ_PRIO_MAX : c_int = 75;
5161+
pub const _SC_READER_WRITER_LOCKS : c_int = 76;
5162+
pub const _SC_REGEXP : c_int = 77;
5163+
pub const _SC_SHELL : c_int = 78;
5164+
pub const _SC_SPAWN : c_int = 79;
5165+
pub const _SC_SPIN_LOCKS : c_int = 80;
5166+
pub const _SC_SPORADIC_SERVER : c_int = 81;
5167+
pub const _SC_THREAD_ATTR_STACKADDR : c_int = 82;
5168+
pub const _SC_THREAD_ATTR_STACKSIZE : c_int = 83;
5169+
pub const _SC_THREAD_CPUTIME : c_int = 84;
5170+
pub const _SC_THREAD_DESTRUCTOR_ITERATIONS : c_int = 85;
5171+
pub const _SC_THREAD_KEYS_MAX : c_int = 86;
5172+
pub const _SC_THREAD_PRIO_INHERIT : c_int = 87;
5173+
pub const _SC_THREAD_PRIO_PROTECT : c_int = 88;
5174+
pub const _SC_THREAD_PRIORITY_SCHEDULING : c_int = 89;
5175+
pub const _SC_THREAD_PROCESS_SHARED : c_int = 90;
5176+
pub const _SC_THREAD_SAFE_FUNCTIONS : c_int = 91;
5177+
pub const _SC_THREAD_SPORADIC_SERVER : c_int = 92;
5178+
pub const _SC_THREAD_STACK_MIN : c_int = 93;
5179+
pub const _SC_THREAD_THREADS_MAX : c_int = 94;
5180+
pub const _SC_TIMEOUTS : c_int = 95;
5181+
pub const _SC_THREADS : c_int = 96;
5182+
pub const _SC_TRACE : c_int = 97;
5183+
pub const _SC_TRACE_EVENT_FILTER : c_int = 98;
5184+
pub const _SC_TRACE_INHERIT : c_int = 99;
5185+
pub const _SC_TRACE_LOG : c_int = 100;
5186+
pub const _SC_TTY_NAME_MAX : c_int = 101;
5187+
pub const _SC_TYPED_MEMORY_OBJECTS : c_int = 102;
5188+
pub const _SC_V6_ILP32_OFF32 : c_int = 103;
5189+
pub const _SC_V6_ILP32_OFFBIG : c_int = 104;
5190+
pub const _SC_V6_LP64_OFF64 : c_int = 105;
5191+
pub const _SC_V6_LPBIG_OFFBIG : c_int = 106;
5192+
pub const _SC_IPV6 : c_int = 118;
5193+
pub const _SC_RAW_SOCKETS : c_int = 119;
5194+
pub const _SC_SYMLOOP_MAX : c_int = 120;
5195+
pub const _SC_ATEXIT_MAX : c_int = 107;
5196+
pub const _SC_IOV_MAX : c_int = 56;
5197+
pub const _SC_PAGE_SIZE: cint = _SC_PAGESIZE;
5198+
pub const _SC_XOPEN_CRYPT : c_int = 108;
5199+
pub const _SC_XOPEN_ENH_I18N : c_int = 109;
5200+
pub const _SC_XOPEN_LEGACY : c_int = 110;
5201+
pub const _SC_XOPEN_REALTIME : c_int = 111;
5202+
pub const _SC_XOPEN_REALTIME_THREADS : c_int = 112;
5203+
pub const _SC_XOPEN_SHM : c_int = 113;
5204+
pub const _SC_XOPEN_STREAMS : c_int = 114;
5205+
pub const _SC_XOPEN_UNIX : c_int = 115;
5206+
pub const _SC_XOPEN_VERSION : c_int = 116;
5207+
pub const _SC_XOPEN_XCU_VERSION : c_int = 121;
52755208
pub const _SC_XBS5_ILP32_OFF32 : c_int = 122;
52765209
pub const _SC_XBS5_ILP32_OFFBIG : c_int = 123;
52775210
pub const _SC_XBS5_LP64_OFF64 : c_int = 124;
52785211
pub const _SC_XBS5_LPBIG_OFFBIG : c_int = 125;
5212+
pub const _SC_SS_REPL_MAX : c_int = 126;
5213+
pub const _SC_TRACE_EVENT_NAME_MAX : c_int = 127;
5214+
pub const _SC_TRACE_NAME_MAX : c_int = 128;
5215+
pub const _SC_TRACE_SYS_MAX : c_int = 129;
5216+
pub const _SC_TRACE_USER_EVENT_MAX : c_int = 130;
5217+
pub const _SC_PASS_MAX : c_int = 131;
52795218
}
52805219
}
52815220
}

0 commit comments

Comments
 (0)