Skip to content

Commit 97a1b6a

Browse files
committed
Update usages of 'OSX' (and other old names) to 'macOS'.
As of last year with version 'Sierra', the Mac operating system is now called 'macOS'.
1 parent f88b24b commit 97a1b6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+63
-63
lines changed

RELEASES.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5056,7 +5056,7 @@ Version 0.1 (2012-01-20)
50565056

50575057
* Compiler works with the following configurations:
50585058
* Linux: x86 and x86_64 hosts and targets
5059-
* MacOS: x86 and x86_64 hosts and targets
5059+
* macOS: x86 and x86_64 hosts and targets
50605060
* Windows: x86 hosts and targets
50615061

50625062
* Cross compilation / multi-target configuration supported.

src/bootstrap/bin/rustc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn main() {
182182
if env::var("RUSTC_RPATH") == Ok("true".to_string()) {
183183
let rpath = if target.contains("apple") {
184184

185-
// Note that we need to take one extra step on OSX to also pass
185+
// Note that we need to take one extra step on macOS to also pass
186186
// `-Wl,-instal_name,@rpath/...` to get things to work right. To
187187
// do that we pass a weird flag to the compiler to get it to do
188188
// so. Note that this is definitely a hack, and we should likely

src/bootstrap/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub fn compiletest(build: &Build,
176176
cmd.arg("--docck-python").arg(build.python());
177177

178178
if build.config.build.ends_with("apple-darwin") {
179-
// Force /usr/bin/python on OSX for LLDB tests because we're loading the
179+
// Force /usr/bin/python on macOS for LLDB tests because we're loading the
180180
// LLDB plugin's compiled module which only works with the system python
181181
// (namely not Homebrew-installed python)
182182
cmd.arg("--lldb-python").arg("/usr/bin/python");

src/bootstrap/compile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub fn rustc(build: &Build, target: &str, compiler: &Compiler) {
249249
cargo.env("CFG_LLVM_ROOT", s);
250250
}
251251
// Building with a static libstdc++ is only supported on linux right now,
252-
// not for MSVC or OSX
252+
// not for MSVC or macOS
253253
if build.config.llvm_static_stdcpp &&
254254
!target.contains("windows") &&
255255
!target.contains("apple") {

src/bootstrap/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ impl Build {
846846
.filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
847847
.collect::<Vec<_>>();
848848

849-
// If we're compiling on OSX then we add a few unconditional flags
849+
// If we're compiling on macOS then we add a few unconditional flags
850850
// indicating that we want libc++ (more filled out than libstdc++) and
851851
// we want to compile for 10.7. This way we can ensure that
852852
// LLVM/jemalloc/etc are all properly compiled.

src/bootstrap/sanity.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ pub fn check(build: &mut Build) {
151151
}
152152

153153
for target in build.config.target.iter() {
154-
// Can't compile for iOS unless we're on OSX
154+
// Can't compile for iOS unless we're on macOS
155155
if target.contains("apple-ios") &&
156156
!build.config.build.contains("apple-darwin") {
157-
panic!("the iOS target is only supported on OSX");
157+
panic!("the iOS target is only supported on macOS");
158158
}
159159

160160
// Make sure musl-root is valid if specified

src/doc/book/src/testing.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ And that's reflected in the summary line:
147147
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured
148148
```
149149

150-
We also get a non-zero status code. We can use `$?` on OS X and Linux:
150+
We also get a non-zero status code. We can use `$?` on macOS and Linux:
151151

152152
```bash
153153
$ echo $?

src/liballoc_jemalloc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub use imp::*;
3030
mod imp {
3131
use libc::{c_int, c_void, size_t};
3232

33-
// Note that the symbols here are prefixed by default on OSX and Windows (we
33+
// Note that the symbols here are prefixed by default on macOS and Windows (we
3434
// don't explicitly request it), and on Android and DragonFly we explicitly
3535
// request it as unprefixing cause segfaults (mismatches in allocators).
3636
extern "C" {

src/librustc/middle/cstore.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ pub enum LinkagePreference {
123123
pub enum NativeLibraryKind {
124124
NativeStatic, // native static library (.a archive)
125125
NativeStaticNobundle, // native static library, which doesn't get bundled into .rlibs
126-
NativeFramework, // OSX-specific
126+
NativeFramework, // macOS-specific
127127
NativeUnknown, // default way to specify a dynamic library
128128
}
129129

src/librustc/session/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options,
971971
always_encode_mir: bool = (false, parse_bool, [TRACKED],
972972
"encode MIR of all functions into the crate metadata"),
973973
osx_rpath_install_name: bool = (false, parse_bool, [TRACKED],
974-
"pass `-install_name @rpath/...` to the OSX linker"),
974+
"pass `-install_name @rpath/...` to the macOS linker"),
975975
sanitizer: Option<Sanitizer> = (None, parse_sanitizer, [TRACKED],
976976
"Use a sanitizer"),
977977
}

src/librustc_back/target/apple_base.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ use std::env;
1313
use target::TargetOptions;
1414

1515
pub fn opts() -> TargetOptions {
16-
// ELF TLS is only available in OSX 10.7+. If you try to compile for 10.6
16+
// ELF TLS is only available in macOS 10.7+. If you try to compile for 10.6
1717
// either the linker will complain if it is used or the binary will end up
18-
// segfaulting at runtime when run on 10.6. Rust by default supports OSX
18+
// segfaulting at runtime when run on 10.6. Rust by default supports macOS
1919
// 10.7+, but there is a standard environment variable,
2020
// MACOSX_DEPLOYMENT_TARGET, which is used to signal targeting older
21-
// versions of OSX. For example compiling on 10.10 with
21+
// versions of macOS. For example compiling on 10.10 with
2222
// MACOSX_DEPLOYMENT_TARGET set to 10.6 will cause the linker to generate
2323
// warnings about the usage of ELF TLS.
2424
//
@@ -33,7 +33,7 @@ pub fn opts() -> TargetOptions {
3333
}).unwrap_or((10, 7));
3434

3535
TargetOptions {
36-
// OSX has -dead_strip, which doesn't rely on function_sections
36+
// macOS has -dead_strip, which doesn't rely on function_sections
3737
function_sections: false,
3838
dynamic_linking: true,
3939
executables: true,

src/librustc_back/target/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ pub struct TargetOptions {
318318
/// Whether the target toolchain is like OpenBSD's.
319319
/// Only useful for compiling against OpenBSD, for configuring abi when returning a struct.
320320
pub is_like_openbsd: bool,
321-
/// Whether the target toolchain is like OSX's. Only useful for compiling against iOS/OS X, in
322-
/// particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
321+
/// Whether the target toolchain is like macOS's. Only useful for compiling against iOS/macOS,
322+
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
323323
pub is_like_osx: bool,
324324
/// Whether the target toolchain is like Solaris's.
325325
/// Only useful for compiling against Illumos/Solaris,

src/librustc_metadata/creader.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ fn register_native_lib(sess: &Session,
9999
}
100100
let is_osx = sess.target.target.options.is_like_osx;
101101
if lib.kind == cstore::NativeFramework && !is_osx {
102-
let msg = "native frameworks are only available on OSX targets";
102+
let msg = "native frameworks are only available on macOS targets";
103103
match span {
104104
Some(span) => span_err!(sess, span, E0455, "{}", msg),
105105
None => sess.err(msg),

src/librustc_metadata/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ name. Example:
2727
"##,
2828

2929
E0455: r##"
30-
Linking with `kind=framework` is only supported when targeting OS X,
30+
Linking with `kind=framework` is only supported when targeting macOS,
3131
as frameworks are specific to that operating system.
3232
3333
Erroneous code example:

src/librustc_metadata/encoder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
14041404
//
14051405
// And here we run into yet another obscure archive bug: in which metadata
14061406
// loaded from archives may have trailing garbage bytes. Awhile back one of
1407-
// our tests was failing sporadically on the OSX 64-bit builders (both nopt
1407+
// our tests was failing sporadically on the macOS 64-bit builders (both nopt
14081408
// and opt) by having ebml generate an out-of-bounds panic when looking at
14091409
// metadata.
14101410
//

src/librustc_trans/back/link.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ fn link_rlib<'a>(sess: &'a Session,
583583
}
584584

585585
// After adding all files to the archive, we need to update the
586-
// symbol table of the archive. This currently dies on OSX (see
586+
// symbol table of the archive. This currently dies on macOS (see
587587
// #11162), and isn't necessary there anyway
588588
if !sess.target.target.options.is_like_osx {
589589
ab.update_symbols();
@@ -764,7 +764,7 @@ fn link_natively(sess: &Session,
764764
// pain to land PRs when they spuriously fail due to a segfault.
765765
//
766766
// The issue #38878 has some more debugging information on it as well, but
767-
// this unfortunately looks like it's just a race condition in OSX's linker
767+
// this unfortunately looks like it's just a race condition in macOS's linker
768768
// with some thread pool working in the background. It seems that no one
769769
// currently knows a fix for this so in the meantime we're left with this...
770770
info!("{:?}", &cmd);
@@ -841,7 +841,7 @@ fn link_natively(sess: &Session,
841841
}
842842

843843

844-
// On OSX, debuggers need this utility to get run to do some munging of
844+
// On macOS, debuggers need this utility to get run to do some munging of
845845
// the symbols
846846
if sess.target.target.options.is_like_osx && sess.opts.debuginfo != NoDebugInfo {
847847
match Command::new("dsymutil").arg(out_filename).output() {

src/librustc_trans/back/linker.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ impl<'a> Linker for GnuLinker<'a> {
139139
.arg("-l").arg(lib)
140140
.arg("-Wl,--no-whole-archive");
141141
} else {
142-
// -force_load is the OSX equivalent of --whole-archive, but it
142+
// -force_load is the macOS equivalent of --whole-archive, but it
143143
// involves passing the full path to the library to link.
144144
let mut v = OsString::from("-Wl,-force_load,");
145145
v.push(&archive::find_library(lib, search_path, &self.sess));

src/librustc_trans/back/symbol_names.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ fn mangle<PI: Iterator<Item=InternedString>>(path: PI, hash: &str) -> String {
351351
// Follow C++ namespace-mangling style, see
352352
// http://en.wikipedia.org/wiki/Name_mangling for more info.
353353
//
354-
// It turns out that on OSX you can actually have arbitrary symbols in
354+
// It turns out that on macOS you can actually have arbitrary symbols in
355355
// function names (at least when given to LLVM), but this is not possible
356356
// when using unix's linker. Perhaps one day when we just use a linker from LLVM
357357
// we won't need to do this name mangling. The problem with name mangling is

src/librustc_trans/debuginfo/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ pub fn finalize(cx: &CrateContext) {
164164
llvm::LLVMRustDIBuilderFinalize(DIB(cx));
165165
llvm::LLVMRustDIBuilderDispose(DIB(cx));
166166
// Debuginfo generation in LLVM by default uses a higher
167-
// version of dwarf than OS X currently understands. We can
167+
// version of dwarf than macOS currently understands. We can
168168
// instruct LLVM to emit an older version of dwarf, however,
169-
// for OS X to understand. For more info see #11352
169+
// for macOS to understand. For more info see #11352
170170
// This can be overridden using --llvm-opts -dwarf-version,N.
171171
// Android has the same issue (#22398)
172172
if cx.sess().target.target.options.is_like_osx ||

src/librustdoc/plugins.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl PluginManager {
4242
/// Load a plugin with the given name.
4343
///
4444
/// Turns `name` into the proper dynamic library filename for the given
45-
/// platform. On windows, it turns into name.dll, on OS X, name.dylib, and
45+
/// platform. On windows, it turns into name.dll, on macOS, name.dylib, and
4646
/// elsewhere, libname.so.
4747
pub fn load_plugin(&mut self, name: String) {
4848
let x = self.prefix.join(libname(name));

src/libstd/os/macos/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! MacOS-specific definitions
11+
//! macOS-specific definitions
1212
1313
#![stable(feature = "raw_ext", since = "1.1.0")]
1414

src/libstd/os/macos/raw.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! MacOS-specific raw type definitions
11+
//! macOS-specific raw type definitions
1212
1313
#![stable(feature = "raw_ext", since = "1.1.0")]
1414
#![rustc_deprecated(since = "1.8.0",

src/libstd/rand/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
//! If an application does not have `getrandom` and likely to be run soon after first booting,
5353
//! or on a system with very few entropy sources, one should consider using `/dev/random` via
5454
//! `ReaderRng`.
55-
//! - On some systems (e.g. FreeBSD, OpenBSD and Mac OS X) there is no difference
55+
//! - On some systems (e.g. FreeBSD, OpenBSD and macOS) there is no difference
5656
//! between the two sources. (Also note that, on some systems e.g. FreeBSD, both `/dev/random`
5757
//! and `/dev/urandom` may block once if the CSPRNG has not seeded yet.)
5858
@@ -195,7 +195,7 @@ impl Rng for ThreadRng {
195195
/// A random number generator that retrieves randomness straight from
196196
/// the operating system. Platform sources:
197197
///
198-
/// - Unix-like systems (Linux, Android, Mac OSX): read directly from
198+
/// - Unix-like systems (Linux, Android, macOS): read directly from
199199
/// `/dev/urandom`, or from `getrandom(2)` system call if available.
200200
/// - Windows: calls `CryptGenRandom`, using the default cryptographic
201201
/// service provider with the `PROV_RSA_FULL` type.

src/libstd/sys/redox/fast_thread_local.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,17 @@ pub unsafe extern fn destroy_value<T>(ptr: *mut u8) {
9696
// `None`.
9797
(*ptr).dtor_running.set(true);
9898

99-
// The OSX implementation of TLS apparently had an odd aspect to it
99+
// The macOS implementation of TLS apparently had an odd aspect to it
100100
// where the pointer we have may be overwritten while this destructor
101101
// is running. Specifically if a TLS destructor re-accesses TLS it may
102102
// trigger a re-initialization of all TLS variables, paving over at
103103
// least some destroyed ones with initial values.
104104
//
105-
// This means that if we drop a TLS value in place on OSX that we could
105+
// This means that if we drop a TLS value in place on macOS that we could
106106
// revert the value to its original state halfway through the
107107
// destructor, which would be bad!
108108
//
109-
// Hence, we use `ptr::read` on OSX (to move to a "safe" location)
109+
// Hence, we use `ptr::read` on macOS (to move to a "safe" location)
110110
// instead of drop_in_place.
111111
if cfg!(target_os = "macos") {
112112
ptr::read((*ptr).inner.get());

src/libstd/sys/redox/process.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ impl Command {
249249
// mutex, and then after the fork they unlock it.
250250
//
251251
// Despite this information, libnative's spawn has been witnessed to
252-
// deadlock on both OSX and FreeBSD. I'm not entirely sure why, but
252+
// deadlock on both macOS and FreeBSD. I'm not entirely sure why, but
253253
// all collected backtraces point at malloc/free traffic in the
254254
// child spawned process.
255255
//

src/libstd/sys/unix/backtrace/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/// Some methods of getting a backtrace:
1414
///
1515
/// * The backtrace() functions on unix. It turns out this doesn't work very
16-
/// well for green threads on OSX, and the address to symbol portion of it
16+
/// well for green threads on macOS, and the address to symbol portion of it
1717
/// suffers problems that are described below.
1818
///
1919
/// * Using libunwind. This is more difficult than it sounds because libunwind
@@ -51,9 +51,9 @@
5151
///
5252
/// * Use dladdr(). The original backtrace()-based idea actually uses dladdr()
5353
/// behind the scenes to translate, and this is why backtrace() was not used.
54-
/// Conveniently, this method works fantastically on OSX. It appears dladdr()
54+
/// Conveniently, this method works fantastically on macOS. It appears dladdr()
5555
/// uses magic to consult the local symbol table, or we're putting everything
56-
/// in the dynamic symbol table anyway. Regardless, for OSX, this is the
56+
/// in the dynamic symbol table anyway. Regardless, for macOS, this is the
5757
/// method used for translation. It's provided by the system and easy to do.o
5858
///
5959
/// Sadly, all other systems have a dladdr() implementation that does not
@@ -75,7 +75,7 @@
7575
/// * Use `libbacktrace`. It turns out that this is a small library bundled in
7676
/// the gcc repository which provides backtrace and symbol translation
7777
/// functionality. All we really need from it is the backtrace functionality,
78-
/// and we only really need this on everything that's not OSX, so this is the
78+
/// and we only really need this on everything that's not macOS, so this is the
7979
/// chosen route for now.
8080
///
8181
/// In summary, the current situation uses libgcc_s to get a trace of stack

src/libstd/sys/unix/ext/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ impl SocketAddr {
204204
let len = self.len as usize - sun_path_offset();
205205
let path = unsafe { mem::transmute::<&[libc::c_char], &[u8]>(&self.addr.sun_path) };
206206

207-
// OSX seems to return a len of 16 and a zeroed sun_path for unnamed addresses
207+
// macOS seems to return a len of 16 and a zeroed sun_path for unnamed addresses
208208
if len == 0 || (cfg!(not(target_os = "linux")) && self.addr.sun_path[0] == 0) {
209209
AddressKind::Unnamed
210210
} else if self.addr.sun_path[0] == 0 {

src/libstd/sys/unix/fast_thread_local.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ unsafe fn register_dtor(t: *mut u8, dtor: unsafe extern fn(*mut u8)) {
128128
register_dtor_fallback(t, dtor);
129129
}
130130

131-
// OSX's analog of the above linux function is this _tlv_atexit function.
131+
// macOS's analog of the above linux function is this _tlv_atexit function.
132132
// The disassembly of thread_local globals in C++ (at least produced by
133133
// clang) will have this show up in the output.
134134
#[cfg(target_os = "macos")]
@@ -154,17 +154,17 @@ pub unsafe extern fn destroy_value<T>(ptr: *mut u8) {
154154
// `None`.
155155
(*ptr).dtor_running.set(true);
156156

157-
// The OSX implementation of TLS apparently had an odd aspect to it
157+
// The macOS implementation of TLS apparently had an odd aspect to it
158158
// where the pointer we have may be overwritten while this destructor
159159
// is running. Specifically if a TLS destructor re-accesses TLS it may
160160
// trigger a re-initialization of all TLS variables, paving over at
161161
// least some destroyed ones with initial values.
162162
//
163-
// This means that if we drop a TLS value in place on OSX that we could
163+
// This means that if we drop a TLS value in place on macOS that we could
164164
// revert the value to its original state halfway through the
165165
// destructor, which would be bad!
166166
//
167-
// Hence, we use `ptr::read` on OSX (to move to a "safe" location)
167+
// Hence, we use `ptr::read` on macOS (to move to a "safe" location)
168168
// instead of drop_in_place.
169169
if cfg!(target_os = "macos") {
170170
ptr::read((*ptr).inner.get());

src/libstd/sys/unix/fd.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fn max_len() -> usize {
2929
// with the man page quoting that if the count of bytes to read is
3030
// greater than `SSIZE_MAX` the result is "unspecified".
3131
//
32-
// On OSX, however, apparently the 64-bit libc is either buggy or
32+
// On macOS, however, apparently the 64-bit libc is either buggy or
3333
// intentionally showing odd behavior by rejecting any read with a size
3434
// larger than or equal to INT_MAX. To handle both of these the read
3535
// size is capped on both platforms.

src/libstd/sys/unix/fs.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ impl File {
439439
// Linux kernel then the flag is just ignored by the OS, so we continue
440440
// to explicitly ask for a CLOEXEC fd here.
441441
//
442-
// The CLOEXEC flag, however, is supported on versions of OSX/BSD/etc
442+
// The CLOEXEC flag, however, is supported on versions of macOS/BSD/etc
443443
// that we support, so we only do this on Linux currently.
444444
if cfg!(target_os = "linux") {
445445
fd.set_cloexec()?;
@@ -573,7 +573,7 @@ impl fmt::Debug for File {
573573
#[cfg(target_os = "macos")]
574574
fn get_path(fd: c_int) -> Option<PathBuf> {
575575
// FIXME: The use of PATH_MAX is generally not encouraged, but it
576-
// is inevitable in this case because OS X defines `fcntl` with
576+
// is inevitable in this case because macOS defines `fcntl` with
577577
// `F_GETPATH` in terms of `MAXPATHLEN`, and there are no
578578
// alternatives. If a better method is invented, it should be used
579579
// instead.

0 commit comments

Comments
 (0)