diff options
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/args.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/common/libunwind.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/fd.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 18 | ||||
| -rw-r--r-- | src/libstd/sys/unix/mod.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/os.rs | 10 | ||||
| -rw-r--r-- | src/libstd/sys/unix/process.rs | 2 | ||||
| -rw-r--r-- | src/libstd/sys/unix/stack_overflow.rs | 4 | ||||
| -rw-r--r-- | src/libstd/sys/unix/thread.rs | 12 |
9 files changed, 28 insertions, 28 deletions
diff --git a/src/libstd/sys/common/args.rs b/src/libstd/sys/common/args.rs index f17a6d5a4b8..4600983eb3b 100644 --- a/src/libstd/sys/common/args.rs +++ b/src/libstd/sys/common/args.rs @@ -39,7 +39,7 @@ pub fn clone() -> Option<Vec<Vec<u8>>> { imp::clone() } target_os = "bitrig", target_os = "netbsd", target_os = "openbsd", - target_os = "sunos"))] + target_os = "solaris"))] mod imp { use prelude::v1::*; diff --git a/src/libstd/sys/common/libunwind.rs b/src/libstd/sys/common/libunwind.rs index d699a5be090..f68e22cc67b 100644 --- a/src/libstd/sys/common/libunwind.rs +++ b/src/libstd/sys/common/libunwind.rs @@ -102,7 +102,7 @@ pub type _Unwind_Exception_Cleanup_Fn = #[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")), target_os = "freebsd", - target_os = "sunos", + target_os = "solaris", all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))), link(name = "gcc_s"))] #[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)), diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs index 1aeed306aa5..94775341c38 100644 --- a/src/libstd/sys/unix/fd.rs +++ b/src/libstd/sys/unix/fd.rs @@ -50,14 +50,14 @@ impl FileDesc { 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) { unsafe { let ret = libc::ioctl(self.fd, libc::FIOCLEX); 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) { unsafe { let previous = libc::fcntl(self.fd, libc::F_GETFD); diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 3e6242f6367..bbc4be9c68a 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -24,9 +24,9 @@ use sys::platform::raw; use sys::{cvt, cvt_r}; use sys_common::{AsInner, FromInner}; use vec::Vec; -#[cfg(target_os = "sunos")] +#[cfg(target_os = "solaris")] use core_collections::borrow::ToOwned; -#[cfg(target_os = "sunos")] +#[cfg(target_os = "solaris")] use boxed::Box; pub struct File(FileDesc); @@ -53,7 +53,7 @@ pub struct DirEntry { // on Solaris because a) it uses a zero-length array to // store the name, b) its lifetime between readdir calls // is not guaranteed. - #[cfg(target_os = "sunos")] + #[cfg(target_os = "solaris")] name: Box<[u8]> } @@ -141,7 +141,7 @@ impl FromInner<raw::mode_t> for FilePermissions { impl Iterator for ReadDir { type Item = io::Result<DirEntry>; - #[cfg(target_os = "sunos")] + #[cfg(target_os = "solaris")] fn next(&mut self) -> Option<io::Result<DirEntry>> { unsafe { 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>> { unsafe { let mut ret = DirEntry { @@ -213,12 +213,12 @@ impl DirEntry { lstat(&self.path()) } - #[cfg(target_os = "sunos")] + #[cfg(target_os = "solaris")] pub fn file_type(&self) -> io::Result<FileType> { 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> { match self.entry.d_type { libc::DT_CHR => Ok(FileType { mode: libc::S_IFCHR }), @@ -235,7 +235,7 @@ impl DirEntry { #[cfg(any(target_os = "macos", target_os = "ios", target_os = "linux", - target_os = "sunos"))] + target_os = "solaris"))] pub fn ino(&self) -> raw::ino_t { self.entry.d_ino } @@ -280,7 +280,7 @@ impl DirEntry { CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes() } } - #[cfg(target_os = "sunos")] + #[cfg(target_os = "solaris")] fn name_bytes(&self) -> &[u8] { &*self.name } diff --git a/src/libstd/sys/unix/mod.rs b/src/libstd/sys/unix/mod.rs index 635a885fa43..f8a4bcdecd7 100644 --- a/src/libstd/sys/unix/mod.rs +++ b/src/libstd/sys/unix/mod.rs @@ -25,7 +25,7 @@ use ops::Neg; #[cfg(target_os = "nacl")] pub use os::nacl 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 = "sunos")] pub use os::sunos as platform; +#[cfg(target_os = "solaris")] pub use os::solaris as platform; pub mod backtrace; pub mod condvar; diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs index e6883a11ada..fc1fea4bc71 100644 --- a/src/libstd/sys/unix/os.rs +++ b/src/libstd/sys/unix/os.rs @@ -45,7 +45,7 @@ pub fn errno() -> i32 { target_os = "android", target_env = "newlib"), 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(any(target_os = "macos", 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> { extern { fn getexecname() -> *const c_char; @@ -384,7 +384,7 @@ pub fn args() -> Args { target_os = "bitrig", target_os = "netbsd", target_os = "openbsd", - target_os = "sunos", + target_os = "solaris", target_os = "nacl"))] pub fn args() -> Args { use sys_common; @@ -507,7 +507,7 @@ pub fn home_dir() -> Option<PathBuf> { fallback() }).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, buf: &mut Vec<c_char>) -> Option<()> { 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, buf: &mut Vec<c_char>) -> Option<()> { // getpwuid_r semantics is different on Illumos/Solaris: diff --git a/src/libstd/sys/unix/process.rs b/src/libstd/sys/unix/process.rs index 000fa097e10..68147c36591 100644 --- a/src/libstd/sys/unix/process.rs +++ b/src/libstd/sys/unix/process.rs @@ -93,7 +93,7 @@ fn os2c(s: &OsStr) -> CString { pub struct ExitStatus(c_int); #[cfg(any(target_os = "linux", target_os = "android", - target_os = "nacl", target_os = "sunos"))] + target_os = "nacl", target_os = "solaris"))] mod status_imp { pub fn WIFEXITED(status: i32) -> bool { (status & 0xff) == 0 } pub fn WEXITSTATUS(status: i32) -> i32 { (status >> 8) & 0xff } diff --git a/src/libstd/sys/unix/stack_overflow.rs b/src/libstd/sys/unix/stack_overflow.rs index 31f37f31578..684924c9279 100644 --- a/src/libstd/sys/unix/stack_overflow.rs +++ b/src/libstd/sys/unix/stack_overflow.rs @@ -39,7 +39,7 @@ impl Drop for Handler { target_os = "bitrig", target_os = "dragonfly", target_os = "freebsd", - target_os = "sunos", + target_os = "solaris", all(target_os = "netbsd", not(target_vendor = "rumprun")), target_os = "openbsd"))] mod imp { @@ -168,7 +168,7 @@ mod imp { target_os = "bitrig", target_os = "dragonfly", target_os = "freebsd", - target_os = "sunos", + target_os = "solaris", all(target_os = "netbsd", not(target_vendor = "rumprun")), target_os = "openbsd")))] mod imp { diff --git a/src/libstd/sys/unix/thread.rs b/src/libstd/sys/unix/thread.rs index 49d5832f037..04570f2f4aa 100644 --- a/src/libstd/sys/unix/thread.rs +++ b/src/libstd/sys/unix/thread.rs @@ -12,7 +12,7 @@ use prelude::v1::*; use alloc::boxed::FnBox; use cmp; -#[cfg(not(any(target_env = "newlib", target_os = "sunos")))] +#[cfg(not(any(target_env = "newlib", target_os = "solaris")))] use ffi::CString; use io; use libc; @@ -122,7 +122,7 @@ impl Thread { 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) { // Newlib and Illumos has no way to set a thread name. } @@ -171,7 +171,7 @@ impl Drop for Thread { not(target_os = "bitrig"), not(all(target_os = "netbsd", not(target_vendor = "rumprun"))), not(target_os = "openbsd"), - not(target_os = "sunos")))] + not(target_os = "solaris")))] #[cfg_attr(test, allow(dead_code))] pub mod guard { pub unsafe fn current() -> Option<usize> { None } @@ -184,7 +184,7 @@ pub mod guard { target_os = "bitrig", all(target_os = "netbsd", not(target_vendor = "rumprun")), target_os = "openbsd", - target_os = "sunos"))] + target_os = "solaris"))] #[cfg_attr(test, allow(dead_code))] pub mod guard { use prelude::v1::*; @@ -197,7 +197,7 @@ pub mod guard { #[cfg(any(target_os = "macos", target_os = "bitrig", target_os = "openbsd", - target_os = "sunos"))] + target_os = "solaris"))] unsafe fn get_stack_start() -> Option<*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) } - #[cfg(target_os = "sunos")] + #[cfg(target_os = "solaris")] pub unsafe fn current() -> Option<usize> { let mut current_stack: libc::stack_t = mem::zeroed(); assert_eq!(libc::stack_getbounds(&mut current_stack), 0); |
