From e95c53d0dfb7696584ce8de7e45c1fd7198c0ca6 Mon Sep 17 00:00:00 2001 From: Dave Huseby Date: Tue, 26 Jan 2016 17:40:46 -0800 Subject: [PATCH] Fixes #156 --- src/unix/bsd/freebsdlike/dragonfly.rs | 2 -- src/unix/bsd/freebsdlike/mod.rs | 1 + src/unix/bsd/openbsdlike/bitrig.rs | 2 +- src/unix/bsd/openbsdlike/netbsd.rs | 1 + src/unix/bsd/openbsdlike/openbsd.rs | 1 + 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/unix/bsd/freebsdlike/dragonfly.rs b/src/unix/bsd/freebsdlike/dragonfly.rs index 0cdc128f49a57..a06d232f44ee0 100644 --- a/src/unix/bsd/freebsdlike/dragonfly.rs +++ b/src/unix/bsd/freebsdlike/dragonfly.rs @@ -6,8 +6,6 @@ pub const KERN_PROC_PATHNAME: ::c_int = 9; pub const SIGSTKSZ: ::size_t = 40960; pub const MADV_INVAL: ::c_int = 10; -pub const HW_AVAILCPU: ::c_int = 25; - extern { pub fn __dfly_error() -> *const ::c_int; } diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index d4b0fa74b26ac..4b3a504dcbfbf 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -363,6 +363,7 @@ pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; pub const _SC_MQ_PRIO_MAX: ::c_int = 75; +pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; diff --git a/src/unix/bsd/openbsdlike/bitrig.rs b/src/unix/bsd/openbsdlike/bitrig.rs index ecb0bfdab93ea..2d72568145d22 100644 --- a/src/unix/bsd/openbsdlike/bitrig.rs +++ b/src/unix/bsd/openbsdlike/bitrig.rs @@ -155,6 +155,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; pub const _SC_MQ_PRIO_MAX : ::c_int = 59; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; pub const _SC_THREADS : ::c_int = 91; pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78; @@ -212,7 +213,6 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; -pub const HW_AVAILCPU: ::c_int = 25; pub const KERN_PROC_ARGS: ::c_int = 55; pub const TMP_MAX : ::c_uint = 0x7fffffff; diff --git a/src/unix/bsd/openbsdlike/netbsd.rs b/src/unix/bsd/openbsdlike/netbsd.rs index f2a10f4c7b19c..6f09ea976e0a8 100644 --- a/src/unix/bsd/openbsdlike/netbsd.rs +++ b/src/unix/bsd/openbsdlike/netbsd.rs @@ -238,6 +238,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 47; pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 48; pub const _SC_LOGIN_NAME_MAX : ::c_int = 37; pub const _SC_MQ_PRIO_MAX : ::c_int = 55; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 1002; pub const _SC_THREADS : ::c_int = 41; pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 61; pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 62; diff --git a/src/unix/bsd/openbsdlike/openbsd.rs b/src/unix/bsd/openbsdlike/openbsd.rs index 8c0f454585e2f..3f9841d923e1f 100644 --- a/src/unix/bsd/openbsdlike/openbsd.rs +++ b/src/unix/bsd/openbsdlike/openbsd.rs @@ -159,6 +159,7 @@ pub const _SC_GETGR_R_SIZE_MAX : ::c_int = 100; pub const _SC_GETPW_R_SIZE_MAX : ::c_int = 101; pub const _SC_LOGIN_NAME_MAX : ::c_int = 102; pub const _SC_MQ_PRIO_MAX : ::c_int = 59; +pub const _SC_NPROCESSORS_ONLN : ::c_int = 503; pub const _SC_THREADS : ::c_int = 91; pub const _SC_THREAD_ATTR_STACKADDR : ::c_int = 77; pub const _SC_THREAD_ATTR_STACKSIZE : ::c_int = 78;