Skip to content

Commit e5da5d5

Browse files
committed
Rename sunos to solaris
1 parent 6d07b68 commit e5da5d5

29 files changed

+55
-57
lines changed

src/compiletest/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const OS_TABLE: &'static [(&'static str, &'static str)] = &[
2525
("openbsd", "openbsd"),
2626
("win32", "windows"),
2727
("windows", "windows"),
28-
("solaris", "sunos"),
28+
("solaris", "solaris"),
2929
];
3030

3131
const ARCH_TABLE: &'static [(&'static str, &'static str)] = &[

src/etc/snapshot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def scrub(b):
4848
"macos": ["bin/rustc"],
4949
"netbsd": ["bin/rustc"],
5050
"openbsd": ["bin/rustc"],
51-
"sunos": ["bin/rustc"],
51+
"solaris": ["bin/rustc"],
5252
"winnt": ["bin/rustc.exe"],
5353
}
5454

src/librustc_back/target/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ mod freebsd_base;
5959
mod linux_base;
6060
mod openbsd_base;
6161
mod netbsd_base;
62-
mod sunos_base;
62+
mod solaris_base;
6363
mod windows_base;
6464
mod windows_msvc_base;
6565

@@ -159,7 +159,7 @@ pub struct TargetOptions {
159159
/// Whether the target toolchain is like Solaris's.
160160
/// Only useful for compiling against Illumos/Solaris,
161161
/// as they have a different set of linker flags. Defaults to false.
162-
pub is_like_sunos: bool,
162+
pub is_like_solaris: bool,
163163
/// Whether the target toolchain is like Windows'. Only useful for compiling against Windows,
164164
/// only really used for figuring out how to find libraries, since Windows uses its own
165165
/// library naming convention. Defaults to false.
@@ -232,7 +232,7 @@ impl Default for TargetOptions {
232232
staticlib_suffix: ".a".to_string(),
233233
target_family: None,
234234
is_like_osx: false,
235-
is_like_sunos: false,
235+
is_like_solaris: false,
236236
is_like_windows: false,
237237
is_like_android: false,
238238
is_like_msvc: false,

src/librustc_back/target/sunos_base.rs renamed to src/librustc_back/target/solaris_base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn opts() -> TargetOptions {
1717
dynamic_linking: true,
1818
executables: true,
1919
has_rpath: true,
20-
is_like_sunos: true,
20+
is_like_solaris: true,
2121
archive_format: "gnu".to_string(),
2222
exe_allocation_crate: super::maybe_jemalloc(),
2323

src/librustc_back/target/x86_64_sun_solaris.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
use target::Target;
1212

1313
pub fn target() -> Target {
14-
let mut base = super::sunos_base::opts();
14+
let mut base = super::solaris_base::opts();
1515
base.pre_link_args.push("-m64".to_string());
1616

1717
Target {
18-
llvm_target: "x86_64-pc-solaris2.11".to_string(),
18+
llvm_target: "x86_64-pc-solaris".to_string(),
1919
target_endian: "little".to_string(),
2020
target_pointer_width: "64".to_string(),
2121
arch: "x86_64".to_string(),
22-
target_os: "sunos".to_string(),
22+
target_os: "solaris".to_string(),
2323
target_env: "".to_string(),
2424
target_vendor: "sun".to_string(),
2525
options: base,

src/librustc_trans/back/linker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ impl<'a> Linker for GnuLinker<'a> {
131131
// insert it here.
132132
if self.sess.target.target.options.is_like_osx {
133133
self.cmd.arg("-Wl,-dead_strip");
134-
} else if self.sess.target.target.options.is_like_sunos {
134+
} else if self.sess.target.target.options.is_like_solaris {
135135
self.cmd.arg("-Wl,-z");
136136
self.cmd.arg("-Wl,ignore");
137137

src/librustdoc/flock.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ mod imp {
111111
pub const F_SETLKW: libc::c_int = 9;
112112
}
113113

114-
#[cfg(target_os = "sunos")]
114+
#[cfg(target_os = "solaris")]
115115
mod os {
116116
use libc;
117117

@@ -122,8 +122,6 @@ mod imp {
122122
pub l_len: libc::off_t,
123123
pub l_sysid: libc::c_int,
124124
pub l_pid: libc::pid_t,
125-
126-
// __unused1: [libc::c_long; 4]
127125
}
128126

129127
pub const F_WRLCK: libc::c_short = 2;

src/libstd/dynamic_lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ mod tests {
173173
target_os = "bitrig",
174174
target_os = "netbsd",
175175
target_os = "openbsd",
176-
target_os = "sunos"))]
176+
target_os = "solaris"))]
177177
#[allow(deprecated)]
178178
fn test_errors_do_not_crash() {
179179
use path::Path;
@@ -197,7 +197,7 @@ mod tests {
197197
target_os = "bitrig",
198198
target_os = "netbsd",
199199
target_os = "openbsd",
200-
target_os = "sunos"))]
200+
target_os = "solaris"))]
201201
mod dl {
202202
use prelude::v1::*;
203203

src/libstd/env.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ pub mod consts {
642642
/// - bitrig
643643
/// - netbsd
644644
/// - openbsd
645-
/// - sunos
645+
/// - solaris
646646
/// - android
647647
/// - windows
648648
#[stable(feature = "env", since = "1.0.0")]
@@ -803,10 +803,10 @@ mod os {
803803
pub const EXE_EXTENSION: &'static str = "";
804804
}
805805

806-
#[cfg(target_os = "sunos")]
806+
#[cfg(target_os = "solaris")]
807807
mod os {
808808
pub const FAMILY: &'static str = "unix";
809-
pub const OS: &'static str = "sunos";
809+
pub const OS: &'static str = "solaris";
810810
pub const DLL_PREFIX: &'static str = "lib";
811811
pub const DLL_SUFFIX: &'static str = ".so";
812812
pub const DLL_EXTENSION: &'static str = "so";

src/libstd/num/f64.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,11 +1066,11 @@ impl f64 {
10661066
0.5 * ((2.0 * self) / (1.0 - self)).ln_1p()
10671067
}
10681068

1069-
// Illumos requires a wrapper around log, log2, and log10 functions
1069+
// Solaris/Illumos requires a wrapper around log, log2, and log10 functions
10701070
// because of their non-standard behavior (e.g. log(-n) returns -Inf instead
10711071
// of expected NaN).
10721072
fn log_wrapper<F: Fn(f64) -> f64>(self, log_fn: F) -> f64 {
1073-
if !cfg!(target_os = "sunos") {
1073+
if !cfg!(target_os = "solaris") {
10741074
log_fn(self)
10751075
} else {
10761076
if self.is_finite() {

src/libstd/os/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ pub use sys::ext as windows;
3030
#[cfg(target_os = "nacl")] pub mod nacl;
3131
#[cfg(target_os = "netbsd")] pub mod netbsd;
3232
#[cfg(target_os = "openbsd")] pub mod openbsd;
33-
#[cfg(target_os = "sunos")] pub mod sunos;
33+
#[cfg(target_os = "solaris")] pub mod solaris;
3434

3535
pub mod raw;
File renamed without changes.
File renamed without changes.

src/libstd/rtdeps.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern {}
3939
#[link(name = "pthread")]
4040
extern {}
4141

42-
#[cfg(target_os = "sunos")]
42+
#[cfg(target_os = "solaris")]
4343
#[link(name = "socket")]
4444
#[link(name = "posix4")]
4545
#[link(name = "pthread")]

src/libstd/sys/common/args.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub fn clone() -> Option<Vec<Vec<u8>>> { imp::clone() }
3939
target_os = "bitrig",
4040
target_os = "netbsd",
4141
target_os = "openbsd",
42-
target_os = "sunos"))]
42+
target_os = "solaris"))]
4343
mod imp {
4444
use prelude::v1::*;
4545

src/libstd/sys/common/libunwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ pub type _Unwind_Exception_Cleanup_Fn =
102102

103103
#[cfg_attr(any(all(target_os = "linux", not(target_env = "musl")),
104104
target_os = "freebsd",
105-
target_os = "sunos",
105+
target_os = "solaris",
106106
all(target_os = "linux", target_env = "musl", not(target_arch = "x86_64"))),
107107
link(name = "gcc_s"))]
108108
#[cfg_attr(all(target_os = "linux", target_env = "musl", target_arch = "x86_64", not(test)),

src/libstd/sys/unix/fd.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ impl FileDesc {
5050
Ok(ret as usize)
5151
}
5252

53-
#[cfg(not(any(target_env = "newlib", target_os = "sunos")))]
53+
#[cfg(not(any(target_env = "newlib", target_os = "solaris")))]
5454
pub fn set_cloexec(&self) {
5555
unsafe {
5656
let ret = libc::ioctl(self.fd, libc::FIOCLEX);
5757
debug_assert_eq!(ret, 0);
5858
}
5959
}
60-
#[cfg(any(target_env = "newlib", target_os = "sunos"))]
60+
#[cfg(any(target_env = "newlib", target_os = "solaris"))]
6161
pub fn set_cloexec(&self) {
6262
unsafe {
6363
let previous = libc::fcntl(self.fd, libc::F_GETFD);

src/libstd/sys/unix/fs.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ use sys::platform::raw;
2424
use sys::{cvt, cvt_r};
2525
use sys_common::{AsInner, FromInner};
2626
use vec::Vec;
27-
#[cfg(target_os = "sunos")]
27+
#[cfg(target_os = "solaris")]
2828
use core_collections::borrow::ToOwned;
29-
#[cfg(target_os = "sunos")]
29+
#[cfg(target_os = "solaris")]
3030
use boxed::Box;
3131

3232
pub struct File(FileDesc);
@@ -53,7 +53,7 @@ pub struct DirEntry {
5353
// on Solaris because a) it uses a zero-length array to
5454
// store the name, b) its lifetime between readdir calls
5555
// is not guaranteed.
56-
#[cfg(target_os = "sunos")]
56+
#[cfg(target_os = "solaris")]
5757
name: Box<[u8]>
5858
}
5959

@@ -141,7 +141,7 @@ impl FromInner<raw::mode_t> for FilePermissions {
141141
impl Iterator for ReadDir {
142142
type Item = io::Result<DirEntry>;
143143

144-
#[cfg(target_os = "sunos")]
144+
#[cfg(target_os = "solaris")]
145145
fn next(&mut self) -> Option<io::Result<DirEntry>> {
146146
unsafe {
147147
loop {
@@ -170,7 +170,7 @@ impl Iterator for ReadDir {
170170
}
171171
}
172172

173-
#[cfg(not(target_os = "sunos"))]
173+
#[cfg(not(target_os = "solaris"))]
174174
fn next(&mut self) -> Option<io::Result<DirEntry>> {
175175
unsafe {
176176
let mut ret = DirEntry {
@@ -213,12 +213,12 @@ impl DirEntry {
213213
lstat(&self.path())
214214
}
215215

216-
#[cfg(target_os = "sunos")]
216+
#[cfg(target_os = "solaris")]
217217
pub fn file_type(&self) -> io::Result<FileType> {
218218
stat(&self.path()).map(|m| m.file_type())
219219
}
220220

221-
#[cfg(not(target_os = "sunos"))]
221+
#[cfg(not(target_os = "solaris"))]
222222
pub fn file_type(&self) -> io::Result<FileType> {
223223
match self.entry.d_type {
224224
libc::DT_CHR => Ok(FileType { mode: libc::S_IFCHR }),
@@ -235,7 +235,7 @@ impl DirEntry {
235235
#[cfg(any(target_os = "macos",
236236
target_os = "ios",
237237
target_os = "linux",
238-
target_os = "sunos"))]
238+
target_os = "solaris"))]
239239
pub fn ino(&self) -> raw::ino_t {
240240
self.entry.d_ino
241241
}
@@ -280,7 +280,7 @@ impl DirEntry {
280280
CStr::from_ptr(self.entry.d_name.as_ptr()).to_bytes()
281281
}
282282
}
283-
#[cfg(target_os = "sunos")]
283+
#[cfg(target_os = "solaris")]
284284
fn name_bytes(&self) -> &[u8] {
285285
&*self.name
286286
}

src/libstd/sys/unix/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use ops::Neg;
2525
#[cfg(target_os = "nacl")] pub use os::nacl as platform;
2626
#[cfg(target_os = "netbsd")] pub use os::netbsd as platform;
2727
#[cfg(target_os = "openbsd")] pub use os::openbsd as platform;
28-
#[cfg(target_os = "sunos")] pub use os::sunos as platform;
28+
#[cfg(target_os = "solaris")] pub use os::solaris as platform;
2929

3030
pub mod backtrace;
3131
pub mod condvar;

src/libstd/sys/unix/os.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub fn errno() -> i32 {
4545
target_os = "android",
4646
target_env = "newlib"),
4747
link_name = "__errno")]
48-
#[cfg_attr(target_os = "sunos", link_name = "___errno")]
48+
#[cfg_attr(target_os = "solaris", link_name = "___errno")]
4949
#[cfg_attr(target_os = "dragonfly", link_name = "__dfly_error")]
5050
#[cfg_attr(any(target_os = "macos",
5151
target_os = "ios",
@@ -258,7 +258,7 @@ pub fn current_exe() -> io::Result<PathBuf> {
258258
}
259259
}
260260

261-
#[cfg(any(target_os = "sunos"))]
261+
#[cfg(any(target_os = "solaris"))]
262262
pub fn current_exe() -> io::Result<PathBuf> {
263263
extern {
264264
fn getexecname() -> *const c_char;
@@ -384,7 +384,7 @@ pub fn args() -> Args {
384384
target_os = "bitrig",
385385
target_os = "netbsd",
386386
target_os = "openbsd",
387-
target_os = "sunos",
387+
target_os = "solaris",
388388
target_os = "nacl"))]
389389
pub fn args() -> Args {
390390
use sys_common;
@@ -507,7 +507,7 @@ pub fn home_dir() -> Option<PathBuf> {
507507
fallback()
508508
}).map(PathBuf::from);
509509

510-
#[cfg(not(target_os = "sunos"))]
510+
#[cfg(not(target_os = "solaris"))]
511511
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
512512
buf: &mut Vec<c_char>) -> Option<()> {
513513
let mut result = ptr::null_mut();
@@ -519,7 +519,7 @@ pub fn home_dir() -> Option<PathBuf> {
519519
}
520520
}
521521

522-
#[cfg(target_os = "sunos")]
522+
#[cfg(target_os = "solaris")]
523523
unsafe fn getpwduid_r(me: libc::uid_t, passwd: &mut libc::passwd,
524524
buf: &mut Vec<c_char>) -> Option<()> {
525525
// getpwuid_r semantics is different on Illumos/Solaris:

src/libstd/sys/unix/process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn os2c(s: &OsStr) -> CString {
9393
pub struct ExitStatus(c_int);
9494

9595
#[cfg(any(target_os = "linux", target_os = "android",
96-
target_os = "nacl", target_os = "sunos"))]
96+
target_os = "nacl", target_os = "solaris"))]
9797
mod status_imp {
9898
pub fn WIFEXITED(status: i32) -> bool { (status & 0xff) == 0 }
9999
pub fn WEXITSTATUS(status: i32) -> i32 { (status >> 8) & 0xff }

src/libstd/sys/unix/stack_overflow.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Drop for Handler {
3939
target_os = "bitrig",
4040
target_os = "dragonfly",
4141
target_os = "freebsd",
42-
target_os = "sunos",
42+
target_os = "solaris",
4343
all(target_os = "netbsd", not(target_vendor = "rumprun")),
4444
target_os = "openbsd"))]
4545
mod imp {
@@ -168,7 +168,7 @@ mod imp {
168168
target_os = "bitrig",
169169
target_os = "dragonfly",
170170
target_os = "freebsd",
171-
target_os = "sunos",
171+
target_os = "solaris",
172172
all(target_os = "netbsd", not(target_vendor = "rumprun")),
173173
target_os = "openbsd")))]
174174
mod imp {

0 commit comments

Comments
 (0)