1
Fork 0

Rename sunos to solaris

This commit is contained in:
Nikita Baksalyar 2016-01-28 14:02:31 +03:00
parent 6d07b68f5e
commit e5da5d59f8
No known key found for this signature in database
GPG key ID: 3EEA378A0EA758DA
29 changed files with 55 additions and 57 deletions

View file

@ -25,7 +25,7 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
("openbsd", "openbsd"), ("openbsd", "openbsd"),
("win32", "windows"), ("win32", "windows"),
("windows", "windows"), ("windows", "windows"),
("solaris", "sunos"), ("solaris", "solaris"),
]; ];
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[ const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[

View file

@ -48,7 +48,7 @@ snapshot_files = {
"macos": ["bin/rustc"], "macos": ["bin/rustc"],
"netbsd": ["bin/rustc"], "netbsd": ["bin/rustc"],
"openbsd": ["bin/rustc"], "openbsd": ["bin/rustc"],
"sunos": ["bin/rustc"], "solaris": ["bin/rustc"],
"winnt": ["bin/rustc.exe"], "winnt": ["bin/rustc.exe"],
} }

View file

@ -59,7 +59,7 @@ mod freebsd_base;
mod linux_base; mod linux_base;
mod openbsd_base; mod openbsd_base;
mod netbsd_base; mod netbsd_base;
mod sunos_base; mod solaris_base;
mod windows_base; mod windows_base;
mod windows_msvc_base; mod windows_msvc_base;
@ -159,7 +159,7 @@ pub struct TargetOptions {
/// Whether the target toolchain is like Solaris's. /// Whether the target toolchain is like Solaris's.
/// Only useful for compiling against Illumos/Solaris, /// Only useful for compiling against Illumos/Solaris,
/// as they have a different set of linker flags. Defaults to false. /// as they have a different set of linker flags. Defaults to false.
pub is_like_sunos: bool, pub is_like_solaris: bool,
/// Whether the target toolchain is like Windows'. Only useful for compiling against Windows, /// Whether the target toolchain is like Windows'. Only useful for compiling against Windows,
/// only really used for figuring out how to find libraries, since Windows uses its own /// only really used for figuring out how to find libraries, since Windows uses its own
/// library naming convention. Defaults to false. /// library naming convention. Defaults to false.
@ -232,7 +232,7 @@ impl Default for TargetOptions {
staticlib_suffix: ".a".to_string(), staticlib_suffix: ".a".to_string(),
target_family: None, target_family: None,
is_like_osx: false, is_like_osx: false,
is_like_sunos: false, is_like_solaris: false,
is_like_windows: false, is_like_windows: false,
is_like_android: false, is_like_android: false,
is_like_msvc: false, is_like_msvc: false,

View file

@ -17,7 +17,7 @@ pub fn opts() -> TargetOptions {
dynamic_linking: true, dynamic_linking: true,
executables: true, executables: true,
has_rpath: true, has_rpath: true,
is_like_sunos: true, is_like_solaris: true,
archive_format: "gnu".to_string(), archive_format: "gnu".to_string(),
exe_allocation_crate: super::maybe_jemalloc(), exe_allocation_crate: super::maybe_jemalloc(),

View file

@ -11,15 +11,15 @@
use target::Target; use target::Target;
pub fn target() -> Target { pub fn target() -> Target {
let mut base = super::sunos_base::opts(); let mut base = super::solaris_base::opts();
base.pre_link_args.push("-m64".to_string()); base.pre_link_args.push("-m64".to_string());
Target { Target {
llvm_target: "x86_64-pc-solaris2.11".to_string(), llvm_target: "x86_64-pc-solaris".to_string(),
target_endian: "little".to_string(), target_endian: "little".to_string(),
target_pointer_width: "64".to_string(), target_pointer_width: "64".to_string(),
arch: "x86_64".to_string(), arch: "x86_64".to_string(),
target_os: "sunos".to_string(), target_os: "solaris".to_string(),
target_env: "".to_string(), target_env: "".to_string(),
target_vendor: "sun".to_string(), target_vendor: "sun".to_string(),
options: base, options: base,

View file

@ -131,7 +131,7 @@ impl<'a> Linker for GnuLinker<'a> {
// insert it here. // insert it here.
if self.sess.target.target.options.is_like_osx { if self.sess.target.target.options.is_like_osx {
self.cmd.arg("-Wl,-dead_strip"); self.cmd.arg("-Wl,-dead_strip");
} else if self.sess.target.target.options.is_like_sunos { } else if self.sess.target.target.options.is_like_solaris {
self.cmd.arg("-Wl,-z"); self.cmd.arg("-Wl,-z");
self.cmd.arg("-Wl,ignore"); self.cmd.arg("-Wl,ignore");

View file

@ -111,7 +111,7 @@ mod imp {
pub const F_SETLKW: libc::c_int = 9; pub const F_SETLKW: libc::c_int = 9;
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
mod os { mod os {
use libc; use libc;
@ -122,8 +122,6 @@ mod imp {
pub l_len: libc::off_t, pub l_len: libc::off_t,
pub l_sysid: libc::c_int, pub l_sysid: libc::c_int,
pub l_pid: libc::pid_t, pub l_pid: libc::pid_t,
// __unused1: [libc::c_long; 4]
} }
pub const F_WRLCK: libc::c_short = 2; pub const F_WRLCK: libc::c_short = 2;

View file

@ -173,7 +173,7 @@ mod tests {
target_os = "bitrig", target_os = "bitrig",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
#[allow(deprecated)] #[allow(deprecated)]
fn test_errors_do_not_crash() { fn test_errors_do_not_crash() {
use path::Path; use path::Path;
@ -197,7 +197,7 @@ mod tests {
target_os = "bitrig", target_os = "bitrig",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
mod dl { mod dl {
use prelude::v1::*; use prelude::v1::*;

View file

@ -642,7 +642,7 @@ pub mod consts {
/// - bitrig /// - bitrig
/// - netbsd /// - netbsd
/// - openbsd /// - openbsd
/// - sunos /// - solaris
/// - android /// - android
/// - windows /// - windows
#[stable(feature = "env", since = "1.0.0")] #[stable(feature = "env", since = "1.0.0")]
@ -803,10 +803,10 @@ mod os {
pub const EXE_EXTENSION: &'static str = ""; pub const EXE_EXTENSION: &'static str = "";
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
mod os { mod os {
pub const FAMILY: &'static str = "unix"; pub const FAMILY: &'static str = "unix";
pub const OS: &'static str = "sunos"; pub const OS: &'static str = "solaris";
pub const DLL_PREFIX: &'static str = "lib"; pub const DLL_PREFIX: &'static str = "lib";
pub const DLL_SUFFIX: &'static str = ".so"; pub const DLL_SUFFIX: &'static str = ".so";
pub const DLL_EXTENSION: &'static str = "so"; pub const DLL_EXTENSION: &'static str = "so";

View file

@ -1066,11 +1066,11 @@ impl f64 {
0.5 * ((2.0 * self) / (1.0 - self)).ln_1p() 0.5 * ((2.0 * self) / (1.0 - self)).ln_1p()
} }
// Illumos requires a wrapper around log, log2, and log10 functions // Solaris/Illumos requires a wrapper around log, log2, and log10 functions
// because of their non-standard behavior (e.g. log(-n) returns -Inf instead // because of their non-standard behavior (e.g. log(-n) returns -Inf instead
// of expected NaN). // of expected NaN).
fn log_wrapper<F: Fn(f64) -> f64>(self, log_fn: F) -> f64 { fn log_wrapper<F: Fn(f64) -> f64>(self, log_fn: F) -> f64 {
if !cfg!(target_os = "sunos") { if !cfg!(target_os = "solaris") {
log_fn(self) log_fn(self)
} else { } else {
if self.is_finite() { if self.is_finite() {

View file

@ -30,6 +30,6 @@ pub use sys::ext as windows;
#[cfg(target_os = "nacl")] pub mod nacl; #[cfg(target_os = "nacl")] pub mod nacl;
#[cfg(target_os = "netbsd")] pub mod netbsd; #[cfg(target_os = "netbsd")] pub mod netbsd;
#[cfg(target_os = "openbsd")] pub mod openbsd; #[cfg(target_os = "openbsd")] pub mod openbsd;
#[cfg(target_os = "sunos")] pub mod sunos; #[cfg(target_os = "solaris")] pub mod solaris;
pub mod raw; pub mod raw;

View file

@ -39,7 +39,7 @@ extern {}
#[link(name = "pthread")] #[link(name = "pthread")]
extern {} extern {}
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
#[link(name = "socket")] #[link(name = "socket")]
#[link(name = "posix4")] #[link(name = "posix4")]
#[link(name = "pthread")] #[link(name = "pthread")]

View file

@ -39,7 +39,7 @@ pub fn clone() -> Option<Vec<Vec<u8>>> { imp::clone() }
target_os = "bitrig", target_os = "bitrig",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
mod imp { mod imp {
use prelude::v1::*; use prelude::v1::*;

View file

@ -102,7 +102,7 @@ pub type _Unwind_Exception_Cleanup_Fn =
#[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")), #[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")),
target_os = "freebsd", target_os = "freebsd",
target_os = "sunos", target_os = "solaris",
all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))), all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))),
link(name = "gcc_s"))] link(name = "gcc_s"))]
#[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)), #[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)),

View file

@ -50,14 +50,14 @@ impl FileDesc {
Ok(ret as usize) Ok(ret as usize)
} }
#[cfg(not(any(target_env = "newlib", target_os = "sunos")))] #[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
pub fn set_cloexec(&self) { pub fn set_cloexec(&self) {
unsafe { unsafe {
let ret = libc::ioctl(self.fd, libc::FIOCLEX); let ret = libc::ioctl(self.fd, libc::FIOCLEX);
debug_assert_eq!(ret, 0); debug_assert_eq!(ret, 0);
} }
} }
#[cfg(any(target_env = "newlib", target_os = "sunos"))] #[cfg(any(target_env = "newlib", target_os = "solaris"))]
pub fn set_cloexec(&self) { pub fn set_cloexec(&self) {
unsafe { unsafe {
let previous = libc::fcntl(self.fd, libc::F_GETFD); let previous = libc::fcntl(self.fd, libc::F_GETFD);

View file

@ -24,9 +24,9 @@ use sys::platform::raw;
use sys::{cvt, cvt_r}; use sys::{cvt, cvt_r};
use sys_common::{AsInner, FromInner}; use sys_common::{AsInner, FromInner};
use vec::Vec; use vec::Vec;
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
use core_collections::borrow::ToOwned; use core_collections::borrow::ToOwned;
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
use boxed::Box; use boxed::Box;
pub struct File(FileDesc); pub struct File(FileDesc);
@ -53,7 +53,7 @@ pub struct DirEntry {
// on Solaris because a) it uses a zero-length array to // on Solaris because a) it uses a zero-length array to
// store the name, b) its lifetime between readdir calls // store the name, b) its lifetime between readdir calls
// is not guaranteed. // is not guaranteed.
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
name: Box<[u8]> name: Box<[u8]>
} }
@ -141,7 +141,7 @@ impl FromInner<raw::mode_t> for FilePermissions {
impl Iterator for ReadDir { impl Iterator for ReadDir {
type Item = io::Result<DirEntry>; type Item = io::Result<DirEntry>;
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
fn next(&mut self) -> Option<io::Result<DirEntry>> { fn next(&mut self) -> Option<io::Result<DirEntry>> {
unsafe { unsafe {
loop { loop {
@ -170,7 +170,7 @@ impl Iterator for ReadDir {
} }
} }
#[cfg(not(target_os = "sunos"))] #[cfg(not(target_os = "solaris"))]
fn next(&mut self) -> Option<io::Result<DirEntry>> { fn next(&mut self) -> Option<io::Result<DirEntry>> {
unsafe { unsafe {
let mut ret = DirEntry { let mut ret = DirEntry {
@ -213,12 +213,12 @@ impl DirEntry {
lstat(&self.path()) lstat(&self.path())
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
pub fn file_type(&self) -> io::Result<FileType> { pub fn file_type(&self) -> io::Result<FileType> {
stat(&self.path()).map(|m| m.file_type()) stat(&self.path()).map(|m| m.file_type())
} }
#[cfg(not(target_os = "sunos"))] #[cfg(not(target_os = "solaris"))]
pub fn file_type(&self) -> io::Result<FileType> { pub fn file_type(&self) -> io::Result<FileType> {
match self.entry.d_type { match self.entry.d_type {
libc::DT_CHR => Ok(FileType { mode: libc::S_IFCHR }), libc::DT_CHR => Ok(FileType { mode: libc::S_IFCHR }),
@ -235,7 +235,7 @@ impl DirEntry {
#[cfg(any(target_os = "macos", #[cfg(any(target_os = "macos",
target_os = "ios", target_os = "ios",
target_os = "linux", target_os = "linux",
target_os = "sunos"))] target_os = "solaris"))]
pub fn ino(&self) -> raw::ino_t { pub fn ino(&self) -> raw::ino_t {
self.entry.d_ino self.entry.d_ino
} }
@ -280,7 +280,7 @@ impl DirEntry {
CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes() CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes()
} }
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
fn name_bytes(&self) -> &[u8] { fn name_bytes(&self) -> &[u8] {
&*self.name &*self.name
} }

View file

@ -25,7 +25,7 @@ use ops::Neg;
#[cfg(target_os = "nacl")] pub use os::nacl as platform; #[cfg(target_os = "nacl")] pub use os::nacl as platform;
#[cfg(target_os = "netbsd")] pub use os::netbsd as platform; #[cfg(target_os = "netbsd")] pub use os::netbsd as platform;
#[cfg(target_os = "openbsd")] pub use os::openbsd as platform; #[cfg(target_os = "openbsd")] pub use os::openbsd as platform;
#[cfg(target_os = "sunos")] pub use os::sunos as platform; #[cfg(target_os = "solaris")] pub use os::solaris as platform;
pub mod backtrace; pub mod backtrace;
pub mod condvar; pub mod condvar;

View file

@ -45,7 +45,7 @@ pub fn errno() -> i32 {
target_os = "android", target_os = "android",
target_env = "newlib"), target_env = "newlib"),
link_name = "__errno")] link_name = "__errno")]
#[cfg_attr(target_os = "sunos", link_name = "___errno")] #[cfg_attr(target_os = "solaris", link_name = "___errno")]
#[cfg_attr(target_os = "dragonfly", link_name = "__dfly_error")] #[cfg_attr(target_os = "dragonfly", link_name = "__dfly_error")]
#[cfg_attr(any(target_os = "macos", #[cfg_attr(any(target_os = "macos",
target_os = "ios", target_os = "ios",
@ -258,7 +258,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
} }
} }
#[cfg(any(target_os = "sunos"))] #[cfg(any(target_os = "solaris"))]
pub fn current_exe() -> io::Result<PathBuf> { pub fn current_exe() -> io::Result<PathBuf> {
extern { extern {
fn getexecname() -> *const c_char; fn getexecname() -> *const c_char;
@ -384,7 +384,7 @@ pub fn args() -> Args {
target_os = "bitrig", target_os = "bitrig",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos", target_os = "solaris",
target_os = "nacl"))] target_os = "nacl"))]
pub fn args() -> Args { pub fn args() -> Args {
use sys_common; use sys_common;
@ -507,7 +507,7 @@ pub fn home_dir() -> Option<PathBuf> {
fallback() fallback()
}).map(PathBuf::from); }).map(PathBuf::from);
#[cfg(not(target_os = "sunos"))] #[cfg(not(target_os = "solaris"))]
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd, unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
buf: &mut Vec<c_char>) -> Option<()> { buf: &mut Vec<c_char>) -> Option<()> {
let mut result = ptr::null_mut(); let mut result = ptr::null_mut();
@ -519,7 +519,7 @@ pub fn home_dir() -> Option<PathBuf> {
} }
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd, unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
buf: &mut Vec<c_char>) -> Option<()> { buf: &mut Vec<c_char>) -> Option<()> {
// getpwuid_r semantics is different on Illumos/Solaris: // getpwuid_r semantics is different on Illumos/Solaris:

View file

@ -93,7 +93,7 @@ fn os2c(s: &OsStr) -> CString {
pub struct ExitStatus(c_int); pub struct ExitStatus(c_int);
#[cfg(any(target_os = "linux", target_os = "android", #[cfg(any(target_os = "linux", target_os = "android",
target_os = "nacl", target_os = "sunos"))] target_os = "nacl", target_os = "solaris"))]
mod status_imp { mod status_imp {
pub fn WIFEXITED(status: i32) -> bool { (status & 0xff) == 0 } pub fn WIFEXITED(status: i32) -> bool { (status & 0xff) == 0 }
pub fn WEXITSTATUS(status: i32) -> i32 { (status >> 8) & 0xff } pub fn WEXITSTATUS(status: i32) -> i32 { (status >> 8) & 0xff }

View file

@ -39,7 +39,7 @@ impl Drop for Handler {
target_os = "bitrig", target_os = "bitrig",
target_os = "dragonfly", target_os = "dragonfly",
target_os = "freebsd", target_os = "freebsd",
target_os = "sunos", target_os = "solaris",
all(target_os = "netbsd", not(target_vendor = "rumprun")), all(target_os = "netbsd", not(target_vendor = "rumprun")),
target_os = "openbsd"))] target_os = "openbsd"))]
mod imp { mod imp {
@ -168,7 +168,7 @@ mod imp {
target_os = "bitrig", target_os = "bitrig",
target_os = "dragonfly", target_os = "dragonfly",
target_os = "freebsd", target_os = "freebsd",
target_os = "sunos", target_os = "solaris",
all(target_os = "netbsd", not(target_vendor = "rumprun")), all(target_os = "netbsd", not(target_vendor = "rumprun")),
target_os = "openbsd")))] target_os = "openbsd")))]
mod imp { mod imp {

View file

@ -12,7 +12,7 @@ use prelude::v1::*;
use alloc::boxed::FnBox; use alloc::boxed::FnBox;
use cmp; use cmp;
#[cfg(not(any(target_env = "newlib", target_os = "sunos")))] #[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
use ffi::CString; use ffi::CString;
use io; use io;
use libc; use libc;
@ -122,7 +122,7 @@ impl Thread {
carg.as_ptr() as *mut libc::c_void); carg.as_ptr() as *mut libc::c_void);
} }
} }
#[cfg(any(target_env = "newlib", target_os = "sunos"))] #[cfg(any(target_env = "newlib", target_os = "solaris"))]
pub fn set_name(_name: &str) { pub fn set_name(_name: &str) {
// Newlib and Illumos has no way to set a thread name. // Newlib and Illumos has no way to set a thread name.
} }
@ -171,7 +171,7 @@ impl Drop for Thread {
not(target_os = "bitrig"), not(target_os = "bitrig"),
not(all(target_os = "netbsd", not(target_vendor = "rumprun"))), not(all(target_os = "netbsd", not(target_vendor = "rumprun"))),
not(target_os = "openbsd"), not(target_os = "openbsd"),
not(target_os = "sunos")))] not(target_os = "solaris")))]
#[cfg_attr(test, allow(dead_code))] #[cfg_attr(test, allow(dead_code))]
pub mod guard { pub mod guard {
pub unsafe fn current() -> Option<usize> { None } pub unsafe fn current() -> Option<usize> { None }
@ -184,7 +184,7 @@ pub mod guard {
target_os = "bitrig", target_os = "bitrig",
all(target_os = "netbsd", not(target_vendor = "rumprun")), all(target_os = "netbsd", not(target_vendor = "rumprun")),
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
#[cfg_attr(test, allow(dead_code))] #[cfg_attr(test, allow(dead_code))]
pub mod guard { pub mod guard {
use prelude::v1::*; use prelude::v1::*;
@ -197,7 +197,7 @@ pub mod guard {
#[cfg(any(target_os = "macos", #[cfg(any(target_os = "macos",
target_os = "bitrig", target_os = "bitrig",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
unsafe fn get_stack_start() -> Option<*mut libc::c_void> { unsafe fn get_stack_start() -> Option<*mut libc::c_void> {
current().map(|s| s as *mut libc::c_void) current().map(|s| s as *mut libc::c_void)
} }
@ -256,7 +256,7 @@ pub mod guard {
Some(stackaddr as usize + offset * psize) Some(stackaddr as usize + offset * psize)
} }
#[cfg(target_os = "sunos")] #[cfg(target_os = "solaris")]
pub unsafe fn current() -> Option<usize> { pub unsafe fn current() -> Option<usize> {
let mut current_stack: libc::stack_t = mem::zeroed(); let mut current_stack: libc::stack_t = mem::zeroed();
assert_eq!(libc::stack_getbounds(&mut current_stack), 0); assert_eq!(libc::stack_getbounds(&mut current_stack), 0);

View file

@ -28,7 +28,7 @@ pub enum Os {
OsNetbsd, OsNetbsd,
OsOpenbsd, OsOpenbsd,
OsNaCl, OsNaCl,
OsSunos, OsSolaris,
} }
#[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)] #[derive(PartialEq, Eq, Hash, RustcEncodable, RustcDecodable, Clone, Copy, Debug)]
@ -148,7 +148,7 @@ impl fmt::Display for Os {
OsNetbsd => "netbsd".fmt(f), OsNetbsd => "netbsd".fmt(f),
OsOpenbsd => "openbsd".fmt(f), OsOpenbsd => "openbsd".fmt(f),
OsNaCl => "nacl".fmt(f), OsNaCl => "nacl".fmt(f),
OsSunos => "sunos".fmt(f), OsSolaris => "solaris".fmt(f),
} }
} }
} }

View file

@ -928,7 +928,7 @@ fn get_concurrency() -> usize {
target_os = "macos", target_os = "macos",
target_os = "ios", target_os = "ios",
target_os = "android", target_os = "android",
target_os = "sunos"))] target_os = "solaris"))]
fn num_cpus() -> usize { fn num_cpus() -> usize {
unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize } unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) as usize }
} }

View file

@ -9,7 +9,7 @@
// except according to those terms. // except according to those terms.
// ignore-bitrig // ignore-bitrig
// ignore-sunos // ignore-solaris
// ignore-windows failing on win32 bot // ignore-windows failing on win32 bot
// ignore-freebsd: gdb package too new // ignore-freebsd: gdb package too new
// ignore-tidy-linelength // ignore-tidy-linelength

View file

@ -24,7 +24,7 @@ mod rusti {
target_os = "dragonfly", target_os = "dragonfly",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
mod m { mod m {
#[main] #[main]
#[cfg(target_arch = "x86")] #[cfg(target_arch = "x86")]

View file

@ -42,7 +42,7 @@ struct Outer {
target_os = "dragonfly", target_os = "dragonfly",
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "sunos"))] target_os = "solaris"))]
mod m { mod m {
#[cfg(target_arch = "x86")] #[cfg(target_arch = "x86")]
pub mod m { pub mod m {

View file

@ -38,5 +38,5 @@ pub fn main() {
target_os = "netbsd", target_os = "netbsd",
target_os = "openbsd", target_os = "openbsd",
target_os = "android", target_os = "android",
target_os = "sunos"))] target_os = "solaris"))]
pub fn main() { } pub fn main() { }