authorgravatar for me@aarvay.comVignesh Rajagopalan <me@aarvay.com> 2020-10-12 14:29:43+05:30
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-12 18:56:25-04:00
log2ab0c7391a871a3063f825e08e02ea2a8e9269e9
tree1df222038a4065fe79841250af05cd03e0ead725
parent53c63bdb73d9fbc5a54afb4977bb975b03c4c9cc

Rename .macosx to .macos


26 files changed, 73 insertions(+), 71 deletions(-)

lib/std/c.zig+4-4
......@@ -22,7 +22,7 @@ pub usingnamespace @import("os/bits.zig");
2222pub usingnamespace switch (std.Target.current.os.tag) {
2323 .linux => @import("c/linux.zig"),
2424 .windows => @import("c/windows.zig"),
25 .macosx, .ios, .tvos, .watchos => @import("c/darwin.zig"),
25 .macos, .ios, .tvos, .watchos => @import("c/darwin.zig"),
2626 .freebsd, .kfreebsd => @import("c/freebsd.zig"),
2727 .netbsd => @import("c/netbsd.zig"),
2828 .dragonfly => @import("c/dragonfly.zig"),
......@@ -122,7 +122,7 @@ pub extern "c" fn readlink(noalias path: [*:0]const u8, noalias buf: [*]u8, bufs
122122pub extern "c" fn readlinkat(dirfd: fd_t, noalias path: [*:0]const u8, noalias buf: [*]u8, bufsize: usize) isize;
123123
124124pub usingnamespace switch (builtin.os.tag) {
125 .macosx, .ios, .watchos, .tvos => struct {
125 .macos, .ios, .watchos, .tvos => struct {
126126 pub const realpath = @"realpath$DARWIN_EXTSN";
127127 pub const fstatat = @"fstatat$INODE64";
128128 },
......@@ -189,7 +189,7 @@ pub usingnamespace switch (builtin.os.tag) {
189189 pub const sigprocmask = __sigprocmask14;
190190 pub const stat = __stat50;
191191 },
192 .macosx, .ios, .watchos, .tvos => struct {
192 .macos, .ios, .watchos, .tvos => struct {
193193 // XXX: close -> close$NOCANCEL
194194 // XXX: getdirentries -> _getdirentries64
195195 pub extern "c" fn clock_getres(clk_id: c_int, tp: *timespec) c_int;
......@@ -252,7 +252,7 @@ pub usingnamespace switch (builtin.os.tag) {
252252 .linux, .freebsd, .kfreebsd, .netbsd, .openbsd => struct {
253253 pub extern "c" fn malloc_usable_size(?*const c_void) usize;
254254 },
255 .macosx, .ios, .watchos, .tvos => struct {
255 .macos, .ios, .watchos, .tvos => struct {
256256 pub extern "c" fn malloc_size(?*const c_void) usize;
257257 },
258258 else => struct {},
lib/std/debug.zig+2-2
......@@ -654,7 +654,7 @@ pub fn openSelfDebugInfo(allocator: *mem.Allocator) anyerror!DebugInfo {
654654 .freebsd,
655655 .netbsd,
656656 .dragonfly,
657 .macosx,
657 .macos,
658658 .windows,
659659 => return DebugInfo.init(allocator),
660660 else => @compileError("openSelfDebugInfo unsupported for this platform"),
......@@ -1320,7 +1320,7 @@ const SymbolInfo = struct {
13201320};
13211321
13221322pub const ModuleDebugInfo = switch (builtin.os.tag) {
1323 .macosx, .ios, .watchos, .tvos => struct {
1323 .macos, .ios, .watchos, .tvos => struct {
13241324 base_address: usize,
13251325 mapped_memory: []const u8,
13261326 symbols: []const MachoSymbol,
lib/std/dynamic_library.zig+2-2
......@@ -19,7 +19,7 @@ const max = std.math.max;
1919pub const DynLib = switch (builtin.os.tag) {
2020 .linux => if (builtin.link_libc) DlDynlib else ElfDynLib,
2121 .windows => WindowsDynLib,
22 .macosx, .tvos, .watchos, .ios, .freebsd => DlDynlib,
22 .macos, .tvos, .watchos, .ios, .freebsd => DlDynlib,
2323 else => void,
2424};
2525
......@@ -404,7 +404,7 @@ test "dynamic_library" {
404404 const libname = switch (builtin.os.tag) {
405405 .linux, .freebsd => "invalid_so.so",
406406 .windows => "invalid_dll.dll",
407 .macosx, .tvos, .watchos, .ios => "invalid_dylib.dylib",
407 .macos, .tvos, .watchos, .ios => "invalid_dylib.dylib",
408408 else => return error.SkipZigTest,
409409 };
410410
lib/std/event/loop.zig+12-12
......@@ -66,7 +66,7 @@ pub const Loop = struct {
6666 };
6767
6868 pub const EventFd = switch (builtin.os.tag) {
69 .macosx, .freebsd, .netbsd, .dragonfly => KEventFd,
69 .macos, .freebsd, .netbsd, .dragonfly => KEventFd,
7070 .linux => struct {
7171 base: ResumeNode,
7272 epoll_op: u32,
......@@ -85,7 +85,7 @@ pub const Loop = struct {
8585 };
8686
8787 pub const Basic = switch (builtin.os.tag) {
88 .macosx, .freebsd, .netbsd, .dragonfly => KEventBasic,
88 .macos, .freebsd, .netbsd, .dragonfly => KEventBasic,
8989 .linux => struct {
9090 base: ResumeNode,
9191 },
......@@ -259,7 +259,7 @@ pub const Loop = struct {
259259 self.extra_threads[extra_thread_index] = try Thread.spawn(self, workerRun);
260260 }
261261 },
262 .macosx, .freebsd, .netbsd, .dragonfly => {
262 .macos, .freebsd, .netbsd, .dragonfly => {
263263 self.os_data.kqfd = try os.kqueue();
264264 errdefer os.close(self.os_data.kqfd);
265265
......@@ -384,7 +384,7 @@ pub const Loop = struct {
384384 while (self.available_eventfd_resume_nodes.pop()) |node| os.close(node.data.eventfd);
385385 os.close(self.os_data.epollfd);
386386 },
387 .macosx, .freebsd, .netbsd, .dragonfly => {
387 .macos, .freebsd, .netbsd, .dragonfly => {
388388 os.close(self.os_data.kqfd);
389389 },
390390 .windows => {
......@@ -478,7 +478,7 @@ pub const Loop = struct {
478478 .linux => {
479479 self.linuxWaitFd(fd, os.EPOLLET | os.EPOLLONESHOT | os.EPOLLIN);
480480 },
481 .macosx, .freebsd, .netbsd, .dragonfly => {
481 .macos, .freebsd, .netbsd, .dragonfly => {
482482 self.bsdWaitKev(@intCast(usize, fd), os.EVFILT_READ, os.EV_ONESHOT);
483483 },
484484 else => @compileError("Unsupported OS"),
......@@ -490,7 +490,7 @@ pub const Loop = struct {
490490 .linux => {
491491 self.linuxWaitFd(fd, os.EPOLLET | os.EPOLLONESHOT | os.EPOLLOUT);
492492 },
493 .macosx, .freebsd, .netbsd, .dragonfly => {
493 .macos, .freebsd, .netbsd, .dragonfly => {
494494 self.bsdWaitKev(@intCast(usize, fd), os.EVFILT_WRITE, os.EV_ONESHOT);
495495 },
496496 else => @compileError("Unsupported OS"),
......@@ -502,7 +502,7 @@ pub const Loop = struct {
502502 .linux => {
503503 self.linuxWaitFd(fd, os.EPOLLET | os.EPOLLONESHOT | os.EPOLLOUT | os.EPOLLIN);
504504 },
505 .macosx, .freebsd, .netbsd, .dragonfly => {
505 .macos, .freebsd, .netbsd, .dragonfly => {
506506 self.bsdWaitKev(@intCast(usize, fd), os.EVFILT_READ, os.EV_ONESHOT);
507507 self.bsdWaitKev(@intCast(usize, fd), os.EVFILT_WRITE, os.EV_ONESHOT);
508508 },
......@@ -571,7 +571,7 @@ pub const Loop = struct {
571571 const eventfd_node = &resume_stack_node.data;
572572 eventfd_node.base.handle = next_tick_node.data;
573573 switch (builtin.os.tag) {
574 .macosx, .freebsd, .netbsd, .dragonfly => {
574 .macos, .freebsd, .netbsd, .dragonfly => {
575575 const kevent_array = @as(*const [1]os.Kevent, &eventfd_node.kevent);
576576 const empty_kevs = &[0]os.Kevent{};
577577 _ = os.kevent(self.os_data.kqfd, kevent_array, empty_kevs, null) catch {
......@@ -633,7 +633,7 @@ pub const Loop = struct {
633633 if (!builtin.single_threaded) {
634634 switch (builtin.os.tag) {
635635 .linux,
636 .macosx,
636 .macos,
637637 .freebsd,
638638 .netbsd,
639639 .dragonfly,
......@@ -725,7 +725,7 @@ pub const Loop = struct {
725725 }
726726 return;
727727 },
728 .macosx, .freebsd, .netbsd, .dragonfly => {
728 .macos, .freebsd, .netbsd, .dragonfly => {
729729 const final_kevent = @as(*const [1]os.Kevent, &self.os_data.final_kevent);
730730 const empty_kevs = &[0]os.Kevent{};
731731 // cannot fail because we already added it and this just enables it
......@@ -1218,7 +1218,7 @@ pub const Loop = struct {
12181218 }
12191219 }
12201220 },
1221 .macosx, .freebsd, .netbsd, .dragonfly => {
1221 .macos, .freebsd, .netbsd, .dragonfly => {
12221222 var eventlist: [1]os.Kevent = undefined;
12231223 const empty_kevs = &[0]os.Kevent{};
12241224 const count = os.kevent(self.os_data.kqfd, empty_kevs, eventlist[0..], null) catch unreachable;
......@@ -1344,7 +1344,7 @@ pub const Loop = struct {
13441344
13451345 const OsData = switch (builtin.os.tag) {
13461346 .linux => LinuxOsData,
1347 .macosx, .freebsd, .netbsd, .dragonfly => KEventData,
1347 .macos, .freebsd, .netbsd, .dragonfly => KEventData,
13481348 .windows => struct {
13491349 io_port: windows.HANDLE,
13501350 extra_thread_count: usize,
lib/std/fs.zig+5-5
......@@ -39,7 +39,7 @@ pub const Watch = @import("fs/watch.zig").Watch;
3939/// fit into a UTF-8 encoded array of this length.
4040/// The byte count includes room for a null sentinel byte.
4141pub const MAX_PATH_BYTES = switch (builtin.os.tag) {
42 .linux, .macosx, .ios, .freebsd, .netbsd, .dragonfly => os.PATH_MAX,
42 .linux, .macos, .ios, .freebsd, .netbsd, .dragonfly => os.PATH_MAX,
4343 // Each UTF-16LE character may be expanded to 3 UTF-8 bytes.
4444 // If it would require 4 UTF-8 bytes, then there would be a surrogate
4545 // pair in the UTF-16LE, and we (over)account 3 bytes for it that way.
......@@ -303,7 +303,7 @@ pub const Dir = struct {
303303 const IteratorError = error{AccessDenied} || os.UnexpectedError;
304304
305305 pub const Iterator = switch (builtin.os.tag) {
306 .macosx, .ios, .freebsd, .netbsd, .dragonfly => struct {
306 .macos, .ios, .freebsd, .netbsd, .dragonfly => struct {
307307 dir: Dir,
308308 seek: i64,
309309 buf: [8192]u8, // TODO align(@alignOf(os.dirent)),
......@@ -318,7 +318,7 @@ pub const Dir = struct {
318318 /// with subsequent calls to `next`, as well as when this `Dir` is deinitialized.
319319 pub fn next(self: *Self) Error!?Entry {
320320 switch (builtin.os.tag) {
321 .macosx, .ios => return self.nextDarwin(),
321 .macos, .ios => return self.nextDarwin(),
322322 .freebsd, .netbsd, .dragonfly => return self.nextBsd(),
323323 else => @compileError("unimplemented"),
324324 }
......@@ -615,7 +615,7 @@ pub const Dir = struct {
615615
616616 pub fn iterate(self: Dir) Iterator {
617617 switch (builtin.os.tag) {
618 .macosx, .ios, .freebsd, .netbsd, .dragonfly => return Iterator{
618 .macos, .ios, .freebsd, .netbsd, .dragonfly => return Iterator{
619619 .dir = self,
620620 .seek = 0,
621621 .index = 0,
......@@ -1302,7 +1302,7 @@ pub const Dir = struct {
13021302 error.AccessDenied => |e| switch (builtin.os.tag) {
13031303 // non-Linux POSIX systems return EPERM when trying to delete a directory, so
13041304 // we need to handle that case specifically and translate the error
1305 .macosx, .ios, .freebsd, .netbsd, .dragonfly => {
1305 .macos, .ios, .freebsd, .netbsd, .dragonfly => {
13061306 // Don't follow symlinks to match unlinkat (which acts on symlinks rather than follows them)
13071307 const fstat = os.fstatatZ(self.fd, sub_path_c, os.AT_SYMLINK_NOFOLLOW) catch return e;
13081308 const is_dir = fstat.mode & os.S_IFMT == os.S_IFDIR;
lib/std/fs/get_app_data_dir.zig+1-1
......@@ -42,7 +42,7 @@ pub fn getAppDataDir(allocator: *mem.Allocator, appname: []const u8) GetAppDataD
4242 else => return error.AppDataDirUnavailable,
4343 }
4444 },
45 .macosx => {
45 .macos => {
4646 const home_dir = os.getenv("HOME") orelse {
4747 // TODO look in /etc/passwd
4848 return error.AppDataDirUnavailable;
lib/std/fs/test.zig+1-1
......@@ -143,7 +143,7 @@ fn contains(entries: *const std.ArrayList(Dir.Entry), el: Dir.Entry) bool {
143143
144144test "Dir.realpath smoke test" {
145145 switch (builtin.os.tag) {
146 .linux, .windows, .macosx, .ios, .watchos, .tvos => {},
146 .linux, .windows, .macos, .ios, .watchos, .tvos => {},
147147 else => return error.SkipZigTest,
148148 }
149149
lib/std/fs/watch.zig+4-4
......@@ -49,7 +49,7 @@ pub fn Watch(comptime V: type) type {
4949
5050 const OsData = switch (builtin.os.tag) {
5151 // TODO https://github.com/ziglang/zig/issues/3778
52 .macosx, .freebsd, .netbsd, .dragonfly => KqOsData,
52 .macos, .freebsd, .netbsd, .dragonfly => KqOsData,
5353 .linux => LinuxOsData,
5454 .windows => WindowsOsData,
5555
......@@ -160,7 +160,7 @@ pub fn Watch(comptime V: type) type {
160160 return self;
161161 },
162162
163 .macosx, .freebsd, .netbsd, .dragonfly => {
163 .macos, .freebsd, .netbsd, .dragonfly => {
164164 self.* = Self{
165165 .allocator = allocator,
166166 .channel = channel,
......@@ -178,7 +178,7 @@ pub fn Watch(comptime V: type) type {
178178 /// All addFile calls and removeFile calls must have completed.
179179 pub fn deinit(self: *Self) void {
180180 switch (builtin.os.tag) {
181 .macosx, .freebsd, .netbsd, .dragonfly => {
181 .macos, .freebsd, .netbsd, .dragonfly => {
182182 // TODO we need to cancel the frames before destroying the lock
183183 self.os_data.table_lock.deinit();
184184 var it = self.os_data.file_table.iterator();
......@@ -229,7 +229,7 @@ pub fn Watch(comptime V: type) type {
229229
230230 pub fn addFile(self: *Self, file_path: []const u8, value: V) !?V {
231231 switch (builtin.os.tag) {
232 .macosx, .freebsd, .netbsd, .dragonfly => return addFileKEvent(self, file_path, value),
232 .macos, .freebsd, .netbsd, .dragonfly => return addFileKEvent(self, file_path, value),
233233 .linux => return addFileLinux(self, file_path, value),
234234 .windows => return addFileWindows(self, file_path, value),
235235 else => @compileError("Unsupported OS"),
lib/std/os.zig+9-9
......@@ -62,7 +62,7 @@ pub const system = if (@hasDecl(root, "os") and root.os != @This())
6262else if (builtin.link_libc)
6363 std.c
6464else switch (builtin.os.tag) {
65 .macosx, .ios, .watchos, .tvos => darwin,
65 .macos, .ios, .watchos, .tvos => darwin,
6666 .freebsd => freebsd,
6767 .linux => linux,
6868 .netbsd => netbsd,
......@@ -354,7 +354,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
354354 // Prevents EINVAL.
355355 const max_count = switch (std.Target.current.os.tag) {
356356 .linux => 0x7ffff000,
357 .macosx, .ios, .watchos, .tvos => math.maxInt(i32),
357 .macos, .ios, .watchos, .tvos => math.maxInt(i32),
358358 else => math.maxInt(isize),
359359 };
360360 const adjusted_len = math.min(max_count, buf.len);
......@@ -582,7 +582,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
582582/// On these systems, the read races with concurrent writes to the same file descriptor.
583583pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
584584 const have_pread_but_not_preadv = switch (std.Target.current.os.tag) {
585 .windows, .macosx, .ios, .watchos, .tvos => true,
585 .windows, .macos, .ios, .watchos, .tvos => true,
586586 else => false,
587587 };
588588 if (have_pread_but_not_preadv) {
......@@ -709,7 +709,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
709709
710710 const max_count = switch (std.Target.current.os.tag) {
711711 .linux => 0x7ffff000,
712 .macosx, .ios, .watchos, .tvos => math.maxInt(i32),
712 .macos, .ios, .watchos, .tvos => math.maxInt(i32),
713713 else => math.maxInt(isize),
714714 };
715715 const adjusted_len = math.min(max_count, bytes.len);
......@@ -863,7 +863,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
863863 // Prevent EINVAL.
864864 const max_count = switch (std.Target.current.os.tag) {
865865 .linux => 0x7ffff000,
866 .macosx, .ios, .watchos, .tvos => math.maxInt(i32),
866 .macos, .ios, .watchos, .tvos => math.maxInt(i32),
867867 else => math.maxInt(isize),
868868 };
869869 const adjusted_len = math.min(max_count, bytes.len);
......@@ -915,7 +915,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
915915/// If `iov.len` is larger than will fit in a `u31`, a partial write will occur.
916916pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize {
917917 const have_pwrite_but_not_pwritev = switch (std.Target.current.os.tag) {
918 .windows, .macosx, .ios, .watchos, .tvos => true,
918 .windows, .macos, .ios, .watchos, .tvos => true,
919919 else => false,
920920 };
921921
......@@ -4091,7 +4091,7 @@ pub fn getFdPath(fd: fd_t, out_buffer: *[MAX_PATH_BYTES]u8) RealPathError![]u8 {
40914091 const end_index = std.unicode.utf16leToUtf8(out_buffer, wide_slice) catch unreachable;
40924092 return out_buffer[0..end_index];
40934093 },
4094 .macosx, .ios, .watchos, .tvos => {
4094 .macos, .ios, .watchos, .tvos => {
40954095 // On macOS, we can use F_GETPATH fcntl command to query the OS for
40964096 // the path to the file descriptor.
40974097 @memset(out_buffer, 0, MAX_PATH_BYTES);
......@@ -4688,7 +4688,7 @@ pub fn sendfile(
46884688 });
46894689 const max_count = switch (std.Target.current.os.tag) {
46904690 .linux => 0x7ffff000,
4691 .macosx, .ios, .watchos, .tvos => math.maxInt(i32),
4691 .macos, .ios, .watchos, .tvos => math.maxInt(i32),
46924692 else => math.maxInt(size_t),
46934693 };
46944694
......@@ -4846,7 +4846,7 @@ pub fn sendfile(
48464846 }
48474847 }
48484848 },
4849 .macosx, .ios, .tvos, .watchos => sf: {
4849 .macos, .ios, .tvos, .watchos => sf: {
48504850 var hdtr_data: std.c.sf_hdtr = undefined;
48514851 var hdtr: ?*std.c.sf_hdtr = null;
48524852 if (headers.len != 0 or trailers.len != 0) {
lib/std/os/bits.zig+1-1
......@@ -12,7 +12,7 @@ const std = @import("std");
1212const root = @import("root");
1313
1414pub usingnamespace switch (std.Target.current.os.tag) {
15 .macosx, .ios, .tvos, .watchos => @import("bits/darwin.zig"),
15 .macos, .ios, .tvos, .watchos => @import("bits/darwin.zig"),
1616 .dragonfly => @import("bits/dragonfly.zig"),
1717 .freebsd => @import("bits/freebsd.zig"),
1818 .linux => @import("bits/linux.zig"),
lib/std/os/test.zig+1-1
......@@ -360,7 +360,7 @@ fn iter_fn(info: *dl_phdr_info, size: usize, counter: *usize) IterFnError!void {
360360}
361361
362362test "dl_iterate_phdr" {
363 if (builtin.os.tag == .windows or builtin.os.tag == .wasi or builtin.os.tag == .macosx)
363 if (builtin.os.tag == .windows or builtin.os.tag == .wasi or builtin.os.tag == .macos)
364364 return error.SkipZigTest;
365365
366366 var counter: usize = 0;
lib/std/packed_int_array.zig+2-2
......@@ -618,7 +618,7 @@ test "PackedIntArray at end of available memory" {
618618 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
619619
620620 switch (builtin.os.tag) {
621 .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
621 .linux, .macos, .ios, .freebsd, .netbsd, .windows => {},
622622 else => return,
623623 }
624624 const PackedArray = PackedIntArray(u3, 8);
......@@ -639,7 +639,7 @@ test "PackedIntSlice at end of available memory" {
639639 if (we_are_testing_this_with_stage1_which_leaks_comptime_memory) return error.SkipZigTest;
640640
641641 switch (builtin.os.tag) {
642 .linux, .macosx, .ios, .freebsd, .netbsd, .windows => {},
642 .linux, .macos, .ios, .freebsd, .netbsd, .windows => {},
643643 else => return,
644644 }
645645 const PackedSlice = PackedIntSlice(u11);
lib/std/process.zig+3-3
......@@ -585,7 +585,7 @@ pub const UserInfo = struct {
585585/// POSIX function which gets a uid from username.
586586pub fn getUserInfo(name: []const u8) !UserInfo {
587587 return switch (builtin.os.tag) {
588 .linux, .macosx, .watchos, .tvos, .ios, .freebsd, .netbsd => posixGetUserInfo(name),
588 .linux, .macos, .watchos, .tvos, .ios, .freebsd, .netbsd => posixGetUserInfo(name),
589589 else => @compileError("Unsupported OS"),
590590 };
591591}
......@@ -688,7 +688,7 @@ pub fn getBaseAddress() usize {
688688 const phdr = os.system.getauxval(std.elf.AT_PHDR);
689689 return phdr - @sizeOf(std.elf.Ehdr);
690690 },
691 .macosx, .freebsd, .netbsd => {
691 .macos, .freebsd, .netbsd => {
692692 return @ptrToInt(&std.c._mh_execute_header);
693693 },
694694 .windows => return @ptrToInt(os.windows.kernel32.GetModuleHandleW(null)),
......@@ -733,7 +733,7 @@ pub fn getSelfExeSharedLibPaths(allocator: *Allocator) error{OutOfMemory}![][:0]
733733 }.callback);
734734 return paths.toOwnedSlice();
735735 },
736 .macosx, .ios, .watchos, .tvos => {
736 .macos, .ios, .watchos, .tvos => {
737737 var paths = List.init(allocator);
738738 errdefer {
739739 const slice = paths.toOwnedSlice();
lib/std/special/compiler_rt/clear_cache.zig+1-1
......@@ -44,7 +44,7 @@ pub fn clear_cache(start: usize, end: usize) callconv(.C) void {
4444 else => false,
4545 };
4646 const apple = switch (os) {
47 .ios, .macosx, .watchos, .tvos => true,
47 .ios, .macos, .watchos, .tvos => true,
4848 else => false,
4949 };
5050 if (x86) {
lib/std/target.zig+8-8
......@@ -31,7 +31,7 @@ pub const Target = struct {
3131 kfreebsd,
3232 linux,
3333 lv2,
34 macosx,
34 macos,
3535 netbsd,
3636 openbsd,
3737 solaris,
......@@ -61,7 +61,7 @@ pub const Target = struct {
6161
6262 pub fn isDarwin(tag: Tag) bool {
6363 return switch (tag) {
64 .ios, .macosx, .watchos, .tvos => true,
64 .ios, .macos, .watchos, .tvos => true,
6565 else => false,
6666 };
6767 }
......@@ -234,7 +234,7 @@ pub const Target = struct {
234234 .max = .{ .major = 12, .minor = 1 },
235235 },
236236 },
237 .macosx => return .{
237 .macos => return .{
238238 .semver = .{
239239 .min = .{ .major = 10, .minor = 13 },
240240 .max = .{ .major = 10, .minor = 15, .patch = 3 },
......@@ -312,7 +312,7 @@ pub const Target = struct {
312312 .windows => return TaggedVersionRange{ .windows = self.version_range.windows },
313313
314314 .freebsd,
315 .macosx,
315 .macos,
316316 .ios,
317317 .tvos,
318318 .watchos,
......@@ -341,7 +341,7 @@ pub const Target = struct {
341341 return switch (os.tag) {
342342 .freebsd,
343343 .netbsd,
344 .macosx,
344 .macos,
345345 .ios,
346346 .tvos,
347347 .watchos,
......@@ -450,7 +450,7 @@ pub const Target = struct {
450450 .other,
451451 => return .eabi,
452452 .openbsd,
453 .macosx,
453 .macos,
454454 .freebsd,
455455 .ios,
456456 .tvos,
......@@ -1277,7 +1277,7 @@ pub const Target = struct {
12771277 .ios,
12781278 .tvos,
12791279 .watchos,
1280 .macosx,
1280 .macos,
12811281 .uefi,
12821282 .windows,
12831283 .emscripten,
......@@ -1450,7 +1450,7 @@ pub const Target = struct {
14501450 .ios,
14511451 .tvos,
14521452 .watchos,
1453 .macosx,
1453 .macos,
14541454 .uefi,
14551455 .windows,
14561456 .emscripten,
lib/std/time.zig+1-1
......@@ -143,7 +143,7 @@ pub const Timer = struct {
143143 /// be less precise
144144 frequency: switch (builtin.os.tag) {
145145 .windows => u64,
146 .macosx, .ios, .tvos, .watchos => os.darwin.mach_timebase_info_data,
146 .macos, .ios, .tvos, .watchos => os.darwin.mach_timebase_info_data,
147147 else => void,
148148 },
149149 resolution: u64,
lib/std/zig/cross_target.zig+3-3
......@@ -137,7 +137,7 @@ pub const CrossTarget = struct {
137137 },
138138
139139 .freebsd,
140 .macosx,
140 .macos,
141141 .ios,
142142 .tvos,
143143 .watchos,
......@@ -578,7 +578,7 @@ pub const CrossTarget = struct {
578578 const os = switch (self.getOsTag()) {
579579 .windows => "windows",
580580 .linux => "linux",
581 .macosx => "macos",
581 .macos => "macos",
582582 else => return error.UnsupportedVcpkgOperatingSystem,
583583 };
584584
......@@ -718,7 +718,7 @@ pub const CrossTarget = struct {
718718 => return error.InvalidOperatingSystemVersion,
719719
720720 .freebsd,
721 .macosx,
721 .macos,
722722 .ios,
723723 .tvos,
724724 .watchos,
lib/std/zig/system.zig+1-1
......@@ -267,7 +267,7 @@ pub const NativeTargetInfo = struct {
267267 os.version_range.windows.max = @intToEnum(Target.Os.WindowsVersion, version);
268268 os.version_range.windows.min = @intToEnum(Target.Os.WindowsVersion, version);
269269 },
270 .macosx => {
270 .macos => {
271271 var scbuf: [32]u8 = undefined;
272272 var size: usize = undefined;
273273
src/codegen/llvm.zig+1-1
......@@ -69,7 +69,7 @@ pub fn targetTriple(allocator: *Allocator, target: std.Target) ![]u8 {
6969 .kfreebsd => "kfreebsd",
7070 .linux => "linux",
7171 .lv2 => "lv2",
72 .macosx => "macosx",
72 .macos => "macosx",
7373 .netbsd => "netbsd",
7474 .openbsd => "openbsd",
7575 .solaris => "solaris",
src/link/MachO.zig+1-1
......@@ -525,7 +525,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
525525 try argv.append(darwinArchString(target.cpu.arch));
526526
527527 switch (target.os.tag) {
528 .macosx => {
528 .macos => {
529529 try argv.append("-macosx_version_min");
530530 },
531531 .ios, .tvos, .watchos => switch (target.cpu.arch) {
src/target.zig+3-3
......@@ -123,14 +123,14 @@ pub fn cannotDynamicLink(target: std.Target) bool {
123123/// since this is the stable syscall interface.
124124pub fn osRequiresLibC(target: std.Target) bool {
125125 return switch (target.os.tag) {
126 .freebsd, .netbsd, .dragonfly, .macosx, .ios, .watchos, .tvos => true,
126 .freebsd, .netbsd, .dragonfly, .macos, .ios, .watchos, .tvos => true,
127127 else => false,
128128 };
129129}
130130
131131pub fn libcNeedsLibUnwind(target: std.Target) bool {
132132 return switch (target.os.tag) {
133 .macosx,
133 .macos,
134134 .ios,
135135 .watchos,
136136 .tvos,
......@@ -197,7 +197,7 @@ pub fn osToLLVM(os_tag: std.Target.Os.Tag) llvm.OSType {
197197 .kfreebsd => .KFreeBSD,
198198 .linux => .Linux,
199199 .lv2 => .Lv2,
200 .macosx => .MacOSX,
200 .macos => .MacOSX,
201201 .netbsd => .NetBSD,
202202 .openbsd => .OpenBSD,
203203 .solaris => .Solaris,
src/type.zig+1-1
......@@ -3104,7 +3104,7 @@ pub const CType = enum {
31043104 },
31053105
31063106 .linux,
3107 .macosx,
3107 .macos,
31083108 .freebsd,
31093109 .netbsd,
31103110 .dragonfly,
src/zig_llvm.cpp+3-1
......@@ -817,7 +817,9 @@ const char *ZigLLVMGetVendorTypeName(ZigLLVM_VendorType vendor) {
817817}
818818
819819const char *ZigLLVMGetOSTypeName(ZigLLVM_OSType os) {
820 return (const char*)Triple::getOSTypeName((Triple::OSType)os).bytes_begin();
820 const char* name = (const char*)Triple::getOSTypeName((Triple::OSType)os).bytes_begin();
821 if (strcmp(name, "macosx") == 0) return "macos";
822 return name;
821823}
822824
823825const char *ZigLLVMGetEnvironmentTypeName(ZigLLVM_EnvironmentType env_type) {
test/stack_traces.zig+1-1
......@@ -308,7 +308,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
308308 },
309309 );
310310 },
311 .macosx => {
311 .macos => {
312312 cases.addCase(
313313 "return",
314314 source_return,
test/stage2/test.zig+1-1
......@@ -13,7 +13,7 @@ const linux_x64 = std.zig.CrossTarget{
1313
1414const macosx_x64 = std.zig.CrossTarget{
1515 .cpu_arch = .x86_64,
16 .os_tag = .macosx,
16 .os_tag = .macos,
1717};
1818
1919const linux_riscv64 = std.zig.CrossTarget{
test/tests.zig+1-1
......@@ -234,7 +234,7 @@ const test_targets = blk: {
234234 TestTarget{
235235 .target = .{
236236 .cpu_arch = .x86_64,
237 .os_tag = .macosx,
237 .os_tag = .macos,
238238 .abi = .gnu,
239239 },
240240 // https://github.com/ziglang/zig/issues/3295