Skip to content

Commit e5da5d5

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

File tree

29 files changed

+55
-57
lines changed

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() {

0 commit comments

Comments
 (0)