From e8fbd1ce048fdfc2db1d446fedfe8775ce446046 Mon Sep 17 00:00:00 2001 From: James Perry Date: Wed, 15 Apr 2015 15:29:51 +0100 Subject: [PATCH 1/2] add all SC constants for macos --- src/liblibc/lib.rs | 129 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 128 insertions(+), 1 deletion(-) diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index ba3a6831d8c75..1f3e5b98fd1e9 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -3750,7 +3750,134 @@ pub mod consts { #[cfg(target_os = "macos")] pub mod sysconf { use types::os::arch::c95::c_int; - pub static _SC_NPROCESSORS_ONLN : c_int = 58; + pub static _SC_ARG_MAX: c_int = 1; + pub static _SC_CHILD_MAX: c_int = 2; + pub static _SC_CLK_TCK: c_int = 3; + pub static _SC_NGROUPS_MAX: c_int = 4; + pub static _SC_OPEN_MAX: c_int = 5; + pub static _SC_JOB_CONTROL: c_int = 6; + pub static _SC_SAVED_IDS: c_int = 7; + pub static _SC_VERSION: c_int = 8; + pub static _SC_BC_BASE_MAX: c_int = 9; + pub static _SC_BC_DIM_MAX: c_int = 10; + pub static _SC_BC_SCALE_MAX: c_int = 11; + pub static _SC_BC_STRING_MAX: c_int = 12; + pub static _SC_COLL_WEIGHTS_MAX: c_int = 13; + pub static _SC_EXPR_NEST_MAX: c_int = 14; + pub static _SC_LINE_MAX: c_int = 15; + pub static _SC_RE_DUP_MAX: c_int = 16; + pub static _SC_2_VERSION: c_int = 17; + pub static _SC_2_C_BIND: c_int = 18; + pub static _SC_2_C_DEV: c_int = 19; + pub static _SC_2_CHAR_TERM: c_int = 20; + pub static _SC_2_FORT_DEV: c_int = 21; + pub static _SC_2_FORT_RUN: c_int = 22; + pub static _SC_2_LOCALEDEF: c_int = 23; + pub static _SC_2_SW_DEV: c_int = 24; + pub static _SC_2_UPE: c_int = 25; + pub static _SC_STREAM_MAX: c_int = 26; + pub static _SC_TZNAME_MAX: c_int = 27; + pub static _SC_ASYNCHRONOUS_IO: c_int = 28; + pub static _SC_PAGESIZE: c_int = 29; + pub static _SC_MEMLOCK: c_int = 30; + pub static _SC_MEMLOCK_RANGE: c_int = 31; + pub static _SC_MEMORY_PROTECTION: c_int = 32; + pub static _SC_MESSAGE_PASSING: c_int = 33; + pub static _SC_PRIORITIZED_IO: c_int = 34; + pub static _SC_PRIORITY_SCHEDULING: c_int = 35; + pub static _SC_REALTIME_SIGNALS: c_int = 36; + pub static _SC_SEMAPHORES: c_int = 37; + pub static _SC_FSYNC: c_int = 38; + pub static _SC_SHARED_MEMORY_OBJECTS: c_int = 39; + pub static _SC_SYNCHRONIZED_IO: c_int = 40; + pub static _SC_TIMERS: c_int = 41; + pub static _SC_AIO_LISTIO_MAX: c_int = 42; + pub static _SC_AIO_MAX: c_int = 43; + pub static _SC_AIO_PRIO_DELTA_MAX: c_int = 44; + pub static _SC_DELAYTIMER_MAX: c_int = 45; + pub static _SC_MQ_OPEN_MAX: c_int = 46; + pub static _SC_MAPPED_FILES: c_int = 47; /* swap _SC_PAGESIZE vs. BSD */ + pub static _SC_RTSIG_MAX: c_int = 48; + pub static _SC_SEM_NSEMS_MAX: c_int = 49; + pub static _SC_SEM_VALUE_MAX: c_int =50; + pub static _SC_SIGQUEUE_MAX: c_int = 51; + pub static _SC_TIMER_MAX: c_int = 52; + pub static _SC_NPROCESSORS_CONF: c_int = 57; + pub static _SC_NPROCESSORS_ONLN: c_int = 58; + pub static _SC_2_PBS: c_int = 59; + pub static _SC_2_PBS_ACCOUNTING: c_int = 60; + pub static _SC_2_PBS_CHECKPOINT: c_int = 61; + pub static _SC_2_PBS_LOCATE: c_int = 62; + pub static _SC_2_PBS_MESSAGE: c_int = 63; + pub static _SC_2_PBS_TRACK: c_int = 64; + pub static _SC_ADVISORY_INFO: c_int = 65; + pub static _SC_BARRIERS: c_int = 66; + pub static _SC_CLOCK_SELECTION: c_int = 67; + pub static _SC_CPUTIME: c_int = 68; + pub static _SC_FILE_LOCKING: c_int = 69; + pub static _SC_GETGR_R_SIZE_MAX: c_int = 70; + pub static _SC_GETPW_R_SIZE_MAX: c_int = 71; + pub static _SC_HOST_NAME_MAX: c_int = 72; + pub static _SC_LOGIN_NAME_MAX: c_int = 73; + pub static _SC_MONOTONIC_CLOCK: c_int = 74; + pub static _SC_MQ_PRIO_MAX: c_int = 75; + pub static _SC_READER_WRITER_LOCKS: c_int = 76; + pub static _SC_REGEXP: c_int = 77; + pub static _SC_SHELL: c_int = 78; + pub static _SC_SPAWN: c_int = 79; + pub static _SC_SPIN_LOCKS: c_int = 80; + pub static _SC_SPORADIC_SERVER: c_int = 81; + pub static _SC_THREAD_ATTR_STACKADDR: c_int = 82; + pub static _SC_THREAD_ATTR_STACKSIZE: c_int = 83; + pub static _SC_THREAD_CPUTIME: c_int = 84; + pub static _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 85; + pub static _SC_THREAD_KEYS_MAX: c_int = 86; + pub static _SC_THREAD_PRIO_INHERIT: c_int = 87; + pub static _SC_THREAD_PRIO_PROTECT: c_int = 88; + pub static _SC_THREAD_PRIORITY_SCHEDULING: c_int = 89; + pub static _SC_THREAD_PROCESS_SHARED: c_int = 90; + pub static _SC_THREAD_SAFE_FUNCTIONS: c_int = 91; + pub static _SC_THREAD_SPORADIC_SERVER: c_int = 92; + pub static _SC_THREAD_STACK_MIN: c_int = 93; + pub static _SC_THREAD_THREADS_MAX: c_int = 94; + pub static _SC_TIMEOUTS: c_int = 95; + pub static _SC_THREADS: c_int = 96; + pub static _SC_TRACE: c_int = 97; + pub static _SC_TRACE_EVENT_FILTER: c_int = 98; + pub static _SC_TRACE_INHERIT: c_int = 99; + pub static _SC_TRACE_LOG: c_int = 100; + pub static _SC_TTY_NAME_MAX: c_int = 101; + pub static _SC_TYPED_MEMORY_OBJECTS: c_int = 102; + pub static _SC_V6_ILP32_OFF32: c_int = 103; + pub static _SC_V6_ILP32_OFFBIG: c_int = 104; + pub static _SC_V6_LP64_OFF64: c_int = 105; + pub static _SC_V6_LPBIG_OFFBIG: c_int = 106; + pub static _SC_IPV6: c_int = 118; + pub static _SC_RAW_SOCKETS: c_int = 119; + pub static _SC_SYMLOOP_MAX: c_int = 120; + pub static _SC_ATEXIT_MAX: c_int = 107; + pub static _SC_IOV_MAX: c_int = 56; + pub static _SC_PAGE_SIZE: cint = _SC_PAGESIZE; + pub static _SC_XOPEN_CRYPT: c_int = 108; + pub static _SC_XOPEN_ENH_I18N: c_int = 109; + pub static _SC_XOPEN_LEGACY: c_int = 110; + pub static _SC_XOPEN_REALTIME: c_int = 111; + pub static _SC_XOPEN_REALTIME_THREADS: c_int = 112; + pub static _SC_XOPEN_SHM: c_int = 113; + pub static _SC_XOPEN_STREAMS: c_int = 114; + pub static _SC_XOPEN_UNIX: c_int = 115; + pub static _SC_XOPEN_VERSION: c_int = 116; + pub static _SC_XOPEN_XCU_VERSION: c_int = 121; + pub static _SC_XBS5_ILP32_OFF32: c_int = 122; + pub static _SC_XBS5_ILP32_OFFBIG: c_int = 123; + pub static _SC_XBS5_LP64_OFF64: c_int = 124; + pub static _SC_XBS5_LPBIG_OFFBIG: c_int = 125; + pub static _SC_SS_REPL_MAX: c_int = 126; + pub static _SC_TRACE_EVENT_NAME_MAX: c_int = 127; + pub static _SC_TRACE_NAME_MAX: c_int = 128; + pub static _SC_TRACE_SYS_MAX: c_int = 129; + pub static _SC_TRACE_USER_EVENT_MAX: c_int = 130; + pub static _SC_PASS_MAX: c_int = 131; } #[cfg(target_os = "android")] From 6afa331a95f6d39c17dc55c67d797d406c3d7f19 Mon Sep 17 00:00:00 2001 From: pez Date: Wed, 15 Apr 2015 17:16:09 +0100 Subject: [PATCH 2/2] fix tabs --- src/liblibc/lib.rs | 186 ++++++++++++++++++++++----------------------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index 1f3e5b98fd1e9..7c437aa8fde39 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -3750,99 +3750,99 @@ pub mod consts { #[cfg(target_os = "macos")] pub mod sysconf { use types::os::arch::c95::c_int; - pub static _SC_ARG_MAX: c_int = 1; - pub static _SC_CHILD_MAX: c_int = 2; - pub static _SC_CLK_TCK: c_int = 3; - pub static _SC_NGROUPS_MAX: c_int = 4; - pub static _SC_OPEN_MAX: c_int = 5; - pub static _SC_JOB_CONTROL: c_int = 6; - pub static _SC_SAVED_IDS: c_int = 7; - pub static _SC_VERSION: c_int = 8; - pub static _SC_BC_BASE_MAX: c_int = 9; - pub static _SC_BC_DIM_MAX: c_int = 10; - pub static _SC_BC_SCALE_MAX: c_int = 11; - pub static _SC_BC_STRING_MAX: c_int = 12; - pub static _SC_COLL_WEIGHTS_MAX: c_int = 13; - pub static _SC_EXPR_NEST_MAX: c_int = 14; - pub static _SC_LINE_MAX: c_int = 15; - pub static _SC_RE_DUP_MAX: c_int = 16; - pub static _SC_2_VERSION: c_int = 17; - pub static _SC_2_C_BIND: c_int = 18; - pub static _SC_2_C_DEV: c_int = 19; - pub static _SC_2_CHAR_TERM: c_int = 20; - pub static _SC_2_FORT_DEV: c_int = 21; - pub static _SC_2_FORT_RUN: c_int = 22; - pub static _SC_2_LOCALEDEF: c_int = 23; - pub static _SC_2_SW_DEV: c_int = 24; - pub static _SC_2_UPE: c_int = 25; - pub static _SC_STREAM_MAX: c_int = 26; - pub static _SC_TZNAME_MAX: c_int = 27; - pub static _SC_ASYNCHRONOUS_IO: c_int = 28; - pub static _SC_PAGESIZE: c_int = 29; - pub static _SC_MEMLOCK: c_int = 30; - pub static _SC_MEMLOCK_RANGE: c_int = 31; - pub static _SC_MEMORY_PROTECTION: c_int = 32; - pub static _SC_MESSAGE_PASSING: c_int = 33; - pub static _SC_PRIORITIZED_IO: c_int = 34; - pub static _SC_PRIORITY_SCHEDULING: c_int = 35; - pub static _SC_REALTIME_SIGNALS: c_int = 36; - pub static _SC_SEMAPHORES: c_int = 37; - pub static _SC_FSYNC: c_int = 38; - pub static _SC_SHARED_MEMORY_OBJECTS: c_int = 39; - pub static _SC_SYNCHRONIZED_IO: c_int = 40; - pub static _SC_TIMERS: c_int = 41; - pub static _SC_AIO_LISTIO_MAX: c_int = 42; - pub static _SC_AIO_MAX: c_int = 43; - pub static _SC_AIO_PRIO_DELTA_MAX: c_int = 44; - pub static _SC_DELAYTIMER_MAX: c_int = 45; - pub static _SC_MQ_OPEN_MAX: c_int = 46; - pub static _SC_MAPPED_FILES: c_int = 47; /* swap _SC_PAGESIZE vs. BSD */ - pub static _SC_RTSIG_MAX: c_int = 48; - pub static _SC_SEM_NSEMS_MAX: c_int = 49; - pub static _SC_SEM_VALUE_MAX: c_int =50; - pub static _SC_SIGQUEUE_MAX: c_int = 51; - pub static _SC_TIMER_MAX: c_int = 52; - pub static _SC_NPROCESSORS_CONF: c_int = 57; - pub static _SC_NPROCESSORS_ONLN: c_int = 58; - pub static _SC_2_PBS: c_int = 59; - pub static _SC_2_PBS_ACCOUNTING: c_int = 60; - pub static _SC_2_PBS_CHECKPOINT: c_int = 61; - pub static _SC_2_PBS_LOCATE: c_int = 62; - pub static _SC_2_PBS_MESSAGE: c_int = 63; - pub static _SC_2_PBS_TRACK: c_int = 64; - pub static _SC_ADVISORY_INFO: c_int = 65; - pub static _SC_BARRIERS: c_int = 66; - pub static _SC_CLOCK_SELECTION: c_int = 67; - pub static _SC_CPUTIME: c_int = 68; - pub static _SC_FILE_LOCKING: c_int = 69; - pub static _SC_GETGR_R_SIZE_MAX: c_int = 70; - pub static _SC_GETPW_R_SIZE_MAX: c_int = 71; - pub static _SC_HOST_NAME_MAX: c_int = 72; - pub static _SC_LOGIN_NAME_MAX: c_int = 73; - pub static _SC_MONOTONIC_CLOCK: c_int = 74; - pub static _SC_MQ_PRIO_MAX: c_int = 75; - pub static _SC_READER_WRITER_LOCKS: c_int = 76; - pub static _SC_REGEXP: c_int = 77; - pub static _SC_SHELL: c_int = 78; - pub static _SC_SPAWN: c_int = 79; - pub static _SC_SPIN_LOCKS: c_int = 80; - pub static _SC_SPORADIC_SERVER: c_int = 81; - pub static _SC_THREAD_ATTR_STACKADDR: c_int = 82; - pub static _SC_THREAD_ATTR_STACKSIZE: c_int = 83; - pub static _SC_THREAD_CPUTIME: c_int = 84; - pub static _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 85; - pub static _SC_THREAD_KEYS_MAX: c_int = 86; - pub static _SC_THREAD_PRIO_INHERIT: c_int = 87; - pub static _SC_THREAD_PRIO_PROTECT: c_int = 88; - pub static _SC_THREAD_PRIORITY_SCHEDULING: c_int = 89; - pub static _SC_THREAD_PROCESS_SHARED: c_int = 90; - pub static _SC_THREAD_SAFE_FUNCTIONS: c_int = 91; - pub static _SC_THREAD_SPORADIC_SERVER: c_int = 92; - pub static _SC_THREAD_STACK_MIN: c_int = 93; - pub static _SC_THREAD_THREADS_MAX: c_int = 94; - pub static _SC_TIMEOUTS: c_int = 95; - pub static _SC_THREADS: c_int = 96; - pub static _SC_TRACE: c_int = 97; + pub static _SC_ARG_MAX : c_int = 1; + pub static _SC_CHILD_MAX : c_int = 2; + pub static _SC_CLK_TCK : c_int = 3; + pub static _SC_NGROUPS_MAX : c_int = 4; + pub static _SC_OPEN_MAX : c_int = 5; + pub static _SC_JOB_CONTROL : c_int = 6; + pub static _SC_SAVED_IDS : c_int = 7; + pub static _SC_VERSION : c_int = 8; + pub static _SC_BC_BASE_MAX : c_int = 9; + pub static _SC_BC_DIM_MAX : c_int = 10; + pub static _SC_BC_SCALE_MAX : c_int = 11; + pub static _SC_BC_STRING_MAX : c_int = 12; + pub static _SC_COLL_WEIGHTS_MAX : c_int = 13; + pub static _SC_EXPR_NEST_MAX : c_int = 14; + pub static _SC_LINE_MAX : c_int = 15; + pub static _SC_RE_DUP_MAX : c_int = 16; + pub static _SC_2_VERSION : c_int = 17; + pub static _SC_2_C_BIND : c_int = 18; + pub static _SC_2_C_DEV : c_int = 19; + pub static _SC_2_CHAR_TERM : c_int = 20; + pub static _SC_2_FORT_DEV : c_int = 21; + pub static _SC_2_FORT_RUN : c_int = 22; + pub static _SC_2_LOCALEDEF : c_int = 23; + pub static _SC_2_SW_DEV : c_int = 24; + pub static _SC_2_UPE : c_int = 25; + pub static _SC_STREAM_MAX : c_int = 26; + pub static _SC_TZNAME_MAX : c_int = 27; + pub static _SC_ASYNCHRONOUS_IO : c_int = 28; + pub static _SC_PAGESIZE : c_int = 29; + pub static _SC_MEMLOCK : c_int = 30; + pub static _SC_MEMLOCK_RANGE : c_int = 31; + pub static _SC_MEMORY_PROTECTION : c_int = 32; + pub static _SC_MESSAGE_PASSING : c_int = 33; + pub static _SC_PRIORITIZED_IO : c_int = 34; + pub static _SC_PRIORITY_SCHEDULING : c_int = 35; + pub static _SC_REALTIME_SIGNALS : c_int = 36; + pub static _SC_SEMAPHORES : c_int = 37; + pub static _SC_FSYNC : c_int = 38; + pub static _SC_SHARED_MEMORY_OBJECTS : c_int = 39; + pub static _SC_SYNCHRONIZED_IO : c_int = 40; + pub static _SC_TIMERS : c_int = 41; + pub static _SC_AIO_LISTIO_MAX : c_int = 42; + pub static _SC_AIO_MAX : c_int = 43; + pub static _SC_AIO_PRIO_DELTA_MAX : c_int = 44; + pub static _SC_DELAYTIMER_MAX : c_int = 45; + pub static _SC_MQ_OPEN_MAX : c_int = 46; + pub static _SC_MAPPED_FILES : c_int = 47; + pub static _SC_RTSIG_MAX : c_int = 48; + pub static _SC_SEM_NSEMS_MAX : c_int = 49; + pub static _SC_SEM_VALUE_MAX : c_int =50; + pub static _SC_SIGQUEUE_MAX : c_int = 51; + pub static _SC_TIMER_MAX : c_int = 52; + pub static _SC_NPROCESSORS_CONF : c_int = 57; + pub static _SC_NPROCESSORS_ONLN : c_int = 58; + pub static _SC_2_PBS : c_int = 59; + pub static _SC_2_PBS_ACCOUNTING : c_int = 60; + pub static _SC_2_PBS_CHECKPOINT : c_int = 61; + pub static _SC_2_PBS_LOCATE : c_int = 62; + pub static _SC_2_PBS_MESSAGE : c_int = 63; + pub static _SC_2_PBS_TRACK : c_int = 64; + pub static _SC_ADVISORY_INFO : c_int = 65; + pub static _SC_BARRIERS : c_int = 66; + pub static _SC_CLOCK_SELECTION : c_int = 67; + pub static _SC_CPUTIME : c_int = 68; + pub static _SC_FILE_LOCKING : c_int = 69; + pub static _SC_GETGR_R_SIZE_MAX : c_int = 70; + pub static _SC_GETPW_R_SIZE_MAX : c_int = 71; + pub static _SC_HOST_NAME_MAX : c_int = 72; + pub static _SC_LOGIN_NAME_MAX : c_int = 73; + pub static _SC_MONOTONIC_CLOCK : c_int = 74; + pub static _SC_MQ_PRIO_MAX : c_int = 75; + pub static _SC_READER_WRITER_LOCKS : c_int = 76; + pub static _SC_REGEXP : c_int = 77; + pub static _SC_SHELL : c_int = 78; + pub static _SC_SPAWN : c_int = 79; + pub static _SC_SPIN_LOCKS : c_int = 80; + pub static _SC_SPORADIC_SERVER : c_int = 81; + pub static _SC_THREAD_ATTR_STACKADDR : c_int = 82; + pub static _SC_THREAD_ATTR_STACKSIZE : c_int = 83; + pub static _SC_THREAD_CPUTIME : c_int = 84; + pub static _SC_THREAD_DESTRUCTOR_ITERATIONS : c_int = 85; + pub static _SC_THREAD_KEYS_MAX : c_int = 86; + pub static _SC_THREAD_PRIO_INHERIT : c_int = 87; + pub static _SC_THREAD_PRIO_PROTECT : c_int = 88; + pub static _SC_THREAD_PRIORITY_SCHEDULING : c_int = 89; + pub static _SC_THREAD_PROCESS_SHARED : c_int = 90; + pub static _SC_THREAD_SAFE_FUNCTIONS : c_int = 91; + pub static _SC_THREAD_SPORADIC_SERVER : c_int = 92; + pub static _SC_THREAD_STACK_MIN : c_int = 93; + pub static _SC_THREAD_THREADS_MAX : c_int = 94; + pub static _SC_TIMEOUTS : c_int = 95; + pub static _SC_THREADS : c_int = 96; + pub static _SC_TRACE : c_int = 97; pub static _SC_TRACE_EVENT_FILTER: c_int = 98; pub static _SC_TRACE_INHERIT: c_int = 99; pub static _SC_TRACE_LOG: c_int = 100;