authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-13 18:05:46+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-11-14 11:33:35+01:00
log9ab7eec23e6aa1fc8d5659566e426816ba573537
treeb6b7bbdbccd75ced24eeb677959d41be06b311ff
parent2e6f7d36b9292b2a88a28c3caab767cd9401175d

represent Mac Catalyst as aarch64-maccatalyst-none rather than aarch64-ios-macabi

Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct OS target. Earlier, when DriverKit support was added to LLVM, it was represented a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in the target triple is beyond me. But this isn't the first time they've ignored established target triple norms (see: armv7k and aarch64_32) and it probably won't be the last. While doing this, I also audited all Darwin OS prongs throughout the codebase and made sure they cover all the tags.

46 files changed, 272 insertions(+), 240 deletions(-)

lib/compiler/aro/aro/Compilation.zig+3-2
......@@ -335,6 +335,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
335335 .openbsd => try define(w, "__OpenBSD__"),
336336 .dragonfly => try define(w, "__DragonFly__"),
337337 .illumos => try defineStd(w, "sun", is_gnu),
338 .maccatalyst,
338339 .macos,
339340 .tvos,
340341 .ios,
......@@ -635,7 +636,7 @@ fn generateSystemDefines(comp: *Compilation, w: *Io.Writer) !void {
635636 },
636637 .aarch64, .aarch64_be => {
637638 try define(w, "__aarch64__");
638 if (comp.target.os.tag == .macos) {
639 if (comp.target.os.tag.isDarwin()) {
639640 try define(w, "__AARCH64_SIMD__");
640641 if (ptr_width == 32) {
641642 try define(w, "__ARM64_ARCH_8_32__");
......@@ -992,7 +993,7 @@ fn writeBuiltinMacros(comp: *Compilation, system_defines_mode: SystemDefinesMode
992993 \\
993994 );
994995 if (comp.langopts.standard.atLeast(.c11)) switch (comp.target.os.tag) {
995 .openbsd, .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
996 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
996997 try w.writeAll("#define __STDC_NO_THREADS__ 1\n");
997998 },
998999 .ps4, .ps5 => {
lib/compiler/aro/aro/Driver.zig+1
......@@ -1467,6 +1467,7 @@ pub fn getPICMode(d: *Driver, lastpic: []const u8) Compilation.Error!struct { ba
14671467 // generation, independent of the argument order.
14681468 if (kernel_or_kext and
14691469 (!(target.os.tag != .ios) or (target.os.isAtLeast(.ios, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and
1470 (!(target.os.tag != .maccatalyst) or (target.os.isAtLeast(.maccatalyst, .{ .major = 6, .minor = 0, .patch = 0 }) orelse false)) and
14701471 !(target.os.tag != .watchos) and
14711472 !(target.os.tag != .driverkit))
14721473 {
lib/compiler/aro/aro/TypeStore.zig+1-1
......@@ -2091,7 +2091,7 @@ fn generateVaListType(ts: *TypeStore, comp: *Compilation) !QualType {
20912091 .xcore,
20922092 => return .void_pointer,
20932093 .aarch64, .aarch64_be => switch (comp.target.os.tag) {
2094 .driverkit, .ios, .macos, .tvos, .visionos, .watchos, .windows => return .char_pointer,
2094 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => return .char_pointer,
20952095 else => .aarch64_va_list,
20962096 },
20972097 .arm, .armeb, .thumb, .thumbeb => .arm_va_list,
lib/compiler/aro/aro/target.zig+6-3
......@@ -674,7 +674,7 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
674674 .emscripten => "emscripten",
675675 .uefi => "windows",
676676 .macos => "macosx",
677 .ios => "ios",
677 .ios, .maccatalyst => "ios",
678678 .tvos => "tvos",
679679 .watchos => "watchos",
680680 .driverkit => "driverkit",
......@@ -703,7 +703,8 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
703703 writer.writeByte('-') catch unreachable;
704704
705705 const llvm_abi = switch (target.abi) {
706 .none, .ilp32 => "unknown",
706 .none => if (target.os.tag == .maccatalyst) "macabi" else "unknown",
707 .ilp32 => "unknown",
707708 .gnu => "gnu",
708709 .gnuabin32 => "gnuabin32",
709710 .gnuabi64 => "gnuabi64",
......@@ -728,7 +729,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
728729 .msvc => "msvc",
729730 .itanium => "itanium",
730731 .simulator => "simulator",
731 .macabi => "macabi",
732732 .ohos => "ohos",
733733 .ohoseabi => "ohoseabi",
734734 };
......@@ -742,6 +742,7 @@ pub fn isPIEDefault(target: std.Target) DefaultPIStatus {
742742 return switch (target.os.tag) {
743743 .haiku,
744744
745 .maccatalyst,
745746 .macos,
746747 .ios,
747748 .tvos,
......@@ -809,6 +810,7 @@ pub fn isPICdefault(target: std.Target) DefaultPIStatus {
809810 return switch (target.os.tag) {
810811 .haiku,
811812
813 .maccatalyst,
812814 .macos,
813815 .ios,
814816 .tvos,
......@@ -917,6 +919,7 @@ pub fn isPICDefaultForced(target: std.Target) DefaultPIStatus {
917919 return if (target.cpu.arch == .x86_64) .yes else .no;
918920 },
919921
922 .maccatalyst,
920923 .macos,
921924 .ios,
922925 .tvos,
lib/compiler_rt/clear_cache.zig+1-1
......@@ -49,7 +49,7 @@ fn clear_cache(start: usize, end: usize) callconv(.c) void {
4949 else => false,
5050 };
5151 const apple = switch (os) {
52 .ios, .macos, .watchos, .tvos, .visionos => true,
52 .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => true,
5353 else => false,
5454 };
5555 if (x86) {
lib/std/Build/Cache.zig+1-1
......@@ -538,7 +538,7 @@ pub const Manifest = struct {
538538 // disambiguates by returning EEXIST, indicating original
539539 // failure was a race, or ENOENT, indicating deletion of
540540 // the directory of our open handle.
541 if (builtin.os.tag != .macos) {
541 if (!builtin.os.tag.isDarwin()) {
542542 self.diagnostic = .{ .manifest_create = error.FileNotFound };
543543 return error.CacheCheckFailed;
544544 }
lib/std/Io.zig+1-1
......@@ -564,7 +564,7 @@ pub const Evented = switch (builtin.os.tag) {
564564 .x86_64, .aarch64 => @import("Io/IoUring.zig"),
565565 else => void, // context-switching code not implemented yet
566566 },
567 .dragonfly, .freebsd, .netbsd, .openbsd, .macos, .ios, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
567 .dragonfly, .freebsd, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
568568 .x86_64, .aarch64 => @import("Io/Kqueue.zig"),
569569 else => void, // context-switching code not implemented yet
570570 },
lib/std/Io/Threaded.zig+5-5
......@@ -5140,11 +5140,11 @@ fn clockToPosix(clock: Io.Clock) posix.clockid_t {
51405140 return switch (clock) {
51415141 .real => posix.CLOCK.REALTIME,
51425142 .awake => switch (native_os) {
5143 .macos, .ios, .watchos, .tvos => posix.CLOCK.UPTIME_RAW,
5143 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.UPTIME_RAW,
51445144 else => posix.CLOCK.MONOTONIC,
51455145 },
51465146 .boot => switch (native_os) {
5147 .macos, .ios, .watchos, .tvos => posix.CLOCK.MONOTONIC_RAW,
5147 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.MONOTONIC_RAW,
51485148 // On freebsd derivatives, use MONOTONIC_FAST as currently there's
51495149 // no precision tradeoff.
51505150 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,
......@@ -5687,7 +5687,7 @@ fn futexWait(t: *Threaded, ptr: *const std.atomic.Value(u32), expect: u32) Io.Ca
56875687 else => unreachable,
56885688 };
56895689 },
5690 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
5690 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
56915691 const c = std.c;
56925692 const flags: c.UL = .{
56935693 .op = .COMPARE_AND_WAIT,
......@@ -5774,7 +5774,7 @@ pub fn futexWaitUncancelable(ptr: *const std.atomic.Value(u32), expect: u32) voi
57745774 else => recoverableOsBugDetected(),
57755775 }
57765776 },
5777 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
5777 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
57785778 const c = std.c;
57795779 const flags: c.UL = .{
57805780 .op = .COMPARE_AND_WAIT,
......@@ -5872,7 +5872,7 @@ pub fn futexWake(ptr: *const std.atomic.Value(u32), max_waiters: u32) void {
58725872 else => return recoverableOsBugDetected(), // deadlock due to operating system bug
58735873 }
58745874 },
5875 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
5875 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
58765876 const c = std.c;
58775877 const flags: c.UL = .{
58785878 .op = .COMPARE_AND_WAIT,
lib/std/Progress.zig+4-2
......@@ -1549,11 +1549,13 @@ const have_sigwinch = switch (builtin.os.tag) {
15491549 .netbsd,
15501550 .openbsd,
15511551 .haiku,
1552 .macos,
1552 .driverkit,
15531553 .ios,
1554 .watchos,
1554 .maccatalyst,
1555 .macos,
15551556 .tvos,
15561557 .visionos,
1558 .watchos,
15571559 .dragonfly,
15581560 .freebsd,
15591561 .serenity,
lib/std/Target.zig+21-11
......@@ -39,6 +39,7 @@ pub const Os = struct {
3939
4040 driverkit,
4141 ios,
42 maccatalyst,
4243 macos,
4344 tvos,
4445 visionos,
......@@ -78,6 +79,7 @@ pub const Os = struct {
7879 return switch (tag) {
7980 .driverkit,
8081 .ios,
82 .maccatalyst,
8183 .macos,
8284 .tvos,
8385 .visionos,
......@@ -121,6 +123,7 @@ pub const Os = struct {
121123 .windows, .uefi => ".dll",
122124 .driverkit,
123125 .ios,
126 .maccatalyst,
124127 .macos,
125128 .tvos,
126129 .visionos,
......@@ -180,8 +183,9 @@ pub const Os = struct {
180183 .openbsd,
181184
182185 .driverkit,
183 .macos,
184186 .ios,
187 .maccatalyst,
188 .macos,
185189 .tvos,
186190 .visionos,
187191 .watchos,
......@@ -546,7 +550,7 @@ pub const Os = struct {
546550 .max = .{ .major = 15, .minor = 6, .patch = 0 },
547551 },
548552 },
549 .ios => .{
553 .ios, .maccatalyst => .{
550554 .semver = .{
551555 .min = .{ .major = 15, .minor = 0, .patch = 0 },
552556 .max = .{ .major = 18, .minor = 6, .patch = 0 },
......@@ -759,7 +763,6 @@ pub const Abi = enum {
759763 msvc,
760764 itanium,
761765 simulator,
762 macabi,
763766 ohos,
764767 ohoseabi,
765768
......@@ -885,8 +888,6 @@ pub const Abi = enum {
885888 => .eabihf,
886889 else => .none,
887890 },
888 .ios => if (arch == .x86_64) .macabi else .none,
889 .tvos, .visionos, .watchos => if (arch == .x86_64) .simulator else .none,
890891 .windows => .gnu,
891892 .uefi => .msvc,
892893 .@"3ds" => .eabihf,
......@@ -902,7 +903,12 @@ pub const Abi = enum {
902903 .serenity,
903904 .dragonfly,
904905 .driverkit,
906 .ios,
907 .maccatalyst,
905908 .macos,
909 .tvos,
910 .visionos,
911 .watchos,
906912 .ps3,
907913 .ps4,
908914 .ps5,
......@@ -1018,7 +1024,7 @@ pub const ObjectFormat = enum {
10181024
10191025 pub fn default(os_tag: Os.Tag, arch: Cpu.Arch) ObjectFormat {
10201026 return switch (os_tag) {
1021 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => .macho,
1027 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => .macho,
10221028 .plan9 => .plan9,
10231029 .uefi, .windows => .coff,
10241030 else => switch (arch) {
......@@ -1988,7 +1994,7 @@ pub const Cpu = struct {
19881994 },
19891995 .armeb, .thumbeb => &arm.cpu.baseline,
19901996 .aarch64 => switch (os.tag) {
1991 .driverkit, .macos => &aarch64.cpu.apple_m1,
1997 .driverkit, .maccatalyst, .macos => &aarch64.cpu.apple_m1,
19921998 .ios, .tvos => &aarch64.cpu.apple_a7,
19931999 .visionos => &aarch64.cpu.apple_m2,
19942000 .watchos => &aarch64.cpu.apple_s4,
......@@ -2014,8 +2020,8 @@ pub const Cpu = struct {
20142020 .sparc => &sparc.cpu.v9, // glibc does not work with 'plain' v8.
20152021 .x86 => &x86.cpu.pentium4,
20162022 .x86_64 => switch (os.tag) {
2017 .driverkit => &x86.cpu.nehalem,
2018 .ios, .macos, .tvos, .visionos, .watchos => &x86.cpu.core2,
2023 .driverkit, .maccatalyst => &x86.cpu.nehalem,
2024 .macos => &x86.cpu.core2,
20192025 .ps4 => &x86.cpu.btver2,
20202026 .ps5 => &x86.cpu.znver2,
20212027 else => generic(arch),
......@@ -2112,7 +2118,7 @@ pub inline fn isMuslLibC(target: *const Target) bool {
21122118
21132119pub inline fn isDarwinLibC(target: *const Target) bool {
21142120 return switch (target.abi) {
2115 .none, .macabi, .simulator => target.os.tag.isDarwin(),
2121 .none, .simulator => target.os.tag.isDarwin(),
21162122 else => false,
21172123 };
21182124}
......@@ -2141,8 +2147,9 @@ pub fn requiresLibC(target: *const Target) bool {
21412147 return switch (target.os.tag) {
21422148 .illumos,
21432149 .driverkit,
2144 .macos,
21452150 .ios,
2151 .maccatalyst,
2152 .macos,
21462153 .tvos,
21472154 .watchos,
21482155 .visionos,
......@@ -2307,6 +2314,7 @@ pub const DynamicLinker = struct {
23072314
23082315 .driverkit,
23092316 .ios,
2317 .maccatalyst,
23102318 .macos,
23112319 .tvos,
23122320 .visionos,
......@@ -2722,6 +2730,7 @@ pub const DynamicLinker = struct {
27222730
27232731 .driverkit,
27242732 .ios,
2733 .maccatalyst,
27252734 .macos,
27262735 .tvos,
27272736 .visionos,
......@@ -3234,6 +3243,7 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) u16 {
32343243
32353244 .driverkit,
32363245 .ios,
3246 .maccatalyst,
32373247 .macos,
32383248 .tvos,
32393249 .visionos,
lib/std/Thread.zig+6-6
......@@ -156,7 +156,7 @@ impl: Impl,
156156pub const max_name_len = switch (native_os) {
157157 .linux => 15,
158158 .windows => 31,
159 .macos, .ios, .watchos, .tvos, .visionos => 63,
159 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 63,
160160 .netbsd => 31,
161161 .freebsd => 15,
162162 .openbsd => 23,
......@@ -234,7 +234,7 @@ pub fn setName(self: Thread, name: []const u8) SetNameError!void {
234234 else => |err| return windows.unexpectedStatus(err),
235235 }
236236 },
237 .macos, .ios, .watchos, .tvos, .visionos => if (use_pthreads) {
237 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => if (use_pthreads) {
238238 // There doesn't seem to be a way to set the name for an arbitrary thread, only the current one.
239239 if (self.getHandle() != std.c.pthread_self()) return error.Unsupported;
240240
......@@ -351,7 +351,7 @@ pub fn getName(self: Thread, buffer_ptr: *[max_name_len:0]u8) GetNameError!?[]co
351351 else => |err| return windows.unexpectedStatus(err),
352352 }
353353 },
354 .macos, .ios, .watchos, .tvos, .visionos => if (use_pthreads) {
354 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => if (use_pthreads) {
355355 const err = std.c.pthread_getname_np(self.getHandle(), buffer.ptr, max_name_len + 1);
356356 switch (@as(posix.E, @enumFromInt(err))) {
357357 .SUCCESS => return std.mem.sliceTo(buffer, 0),
......@@ -411,7 +411,7 @@ pub const Id = switch (native_os) {
411411 .wasi,
412412 .serenity,
413413 => u32,
414 .macos, .ios, .watchos, .tvos, .visionos => u64,
414 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u64,
415415 .windows => windows.DWORD,
416416 else => usize,
417417};
......@@ -741,7 +741,7 @@ const PosixThreadImpl = struct {
741741 .linux => {
742742 return LinuxThreadImpl.getCurrentId();
743743 },
744 .macos, .ios, .watchos, .tvos, .visionos => {
744 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
745745 var thread_id: u64 = undefined;
746746 // Pass thread=null to get the current thread ID.
747747 assert(c.pthread_threadid_np(null, &thread_id) == 0);
......@@ -1734,7 +1734,7 @@ test "setName, getName" {
17341734 context.test_done_event.wait();
17351735
17361736 switch (native_os) {
1737 .macos, .ios, .watchos, .tvos, .visionos => {
1737 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
17381738 const res = thread.setName("foobar");
17391739 try std.testing.expectError(error.Unsupported, res);
17401740 },
lib/std/builtin.zig+1-1
......@@ -987,7 +987,7 @@ pub const VaList = switch (builtin.cpu.arch) {
987987 .xcore,
988988 => *anyopaque,
989989 .aarch64, .aarch64_be => switch (builtin.os.tag) {
990 .driverkit, .ios, .macos, .tvos, .visionos, .watchos, .windows => *u8,
990 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows => *u8,
991991 else => switch (builtin.zig_backend) {
992992 else => VaListAarch64,
993993 .stage2_llvm => @compileError("disabled due to miscompilations"),
lib/std/c.zig+116-110
......@@ -115,7 +115,7 @@ pub const timespec = switch (native_os) {
115115 sec: time_t,
116116 nsec: c_long,
117117 },
118 .dragonfly, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
118 .dragonfly, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
119119 sec: isize,
120120 nsec: isize,
121121 },
......@@ -134,7 +134,7 @@ pub const dev_t = switch (native_os) {
134134 .linux => linux.dev_t,
135135 .emscripten => emscripten.dev_t,
136136 .wasi => wasi.device_t,
137 .openbsd, .haiku, .illumos, .macos, .ios, .tvos, .watchos, .visionos => i32,
137 .openbsd, .haiku, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => i32,
138138 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L43
139139 .netbsd, .freebsd, .serenity => u64,
140140 else => void,
......@@ -145,7 +145,7 @@ pub const mode_t = switch (native_os) {
145145 .emscripten => emscripten.mode_t,
146146 .openbsd, .haiku, .netbsd, .illumos, .wasi, .windows => u32,
147147 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L44
148 .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .dragonfly, .serenity => u16,
148 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .dragonfly, .serenity => u16,
149149 else => u0,
150150};
151151
......@@ -194,7 +194,7 @@ pub const passwd = switch (native_os) {
194194 dir: ?[*:0]const u8, // home directory
195195 shell: ?[*:0]const u8, // shell program
196196 },
197 .netbsd, .openbsd, .macos => extern struct {
197 .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
198198 name: ?[*:0]const u8, // user name
199199 passwd: ?[*:0]const u8, // encrypted password
200200 uid: uid_t, // user uid
......@@ -223,7 +223,7 @@ pub const passwd = switch (native_os) {
223223};
224224
225225pub const group = switch (native_os) {
226 .linux, .freebsd, .openbsd, .dragonfly, .netbsd, .macos => extern struct {
226 .linux, .freebsd, .openbsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
227227 name: ?[*:0]const u8,
228228 passwd: ?[*:0]const u8,
229229 gid: gid_t,
......@@ -275,7 +275,7 @@ pub const CLOCK = clockid_t;
275275pub const clockid_t = switch (native_os) {
276276 .linux, .emscripten => linux.clockid_t,
277277 .wasi => wasi.clockid_t,
278 .macos, .ios, .tvos, .watchos, .visionos => enum(u32) {
278 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(u32) {
279279 REALTIME = 0,
280280 MONOTONIC = 6,
281281 MONOTONIC_RAW = 4,
......@@ -457,7 +457,7 @@ pub const E = switch (native_os) {
457457 DQUOT = 10069,
458458 _,
459459 },
460 .macos, .ios, .tvos, .watchos, .visionos => darwin.E,
460 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.E,
461461 .freebsd => freebsd.E,
462462 .illumos => enum(u16) {
463463 /// No error occurred.
......@@ -833,7 +833,7 @@ pub const F = switch (native_os) {
833833 pub const GETFL = 3;
834834 pub const SETFL = 4;
835835 },
836 .macos, .ios, .tvos, .watchos, .visionos => struct {
836 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
837837 /// duplicate file descriptor
838838 pub const DUPFD = 0;
839839 /// get file descriptor flags
......@@ -1243,7 +1243,7 @@ pub const R_OK = switch (native_os) {
12431243pub const Flock = switch (native_os) {
12441244 .linux => linux.Flock,
12451245 .emscripten => emscripten.Flock,
1246 .openbsd, .dragonfly, .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
1246 .openbsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
12471247 start: off_t,
12481248 len: off_t,
12491249 pid: pid_t,
......@@ -1294,7 +1294,7 @@ pub const Flock = switch (native_os) {
12941294};
12951295pub const HOST_NAME_MAX = switch (native_os) {
12961296 .linux => linux.HOST_NAME_MAX,
1297 .macos, .ios, .tvos, .watchos, .visionos => 72,
1297 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 72,
12981298 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd => 255,
12991299 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L22
13001300 .serenity => 64,
......@@ -1305,7 +1305,7 @@ pub const IOV_MAX = switch (native_os) {
13051305 .emscripten => emscripten.IOV_MAX,
13061306 // https://github.com/SerenityOS/serenity/blob/098af0f846a87b651731780ff48420205fd33754/Kernel/API/POSIX/sys/uio.h#L16
13071307 .openbsd, .haiku, .illumos, .wasi, .serenity => 1024,
1308 .macos, .ios, .tvos, .watchos, .visionos => 16,
1308 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 16,
13091309 .dragonfly, .netbsd, .freebsd => KERN.IOV_MAX,
13101310 else => {},
13111311};
......@@ -1524,7 +1524,7 @@ pub const KERN = switch (native_os) {
15241524pub const MADV = switch (native_os) {
15251525 .linux => linux.MADV,
15261526 .emscripten => emscripten.MADV,
1527 .macos, .ios, .tvos, .watchos, .visionos => struct {
1527 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
15281528 pub const NORMAL = 0;
15291529 pub const RANDOM = 1;
15301530 pub const SEQUENTIAL = 2;
......@@ -1622,7 +1622,7 @@ pub const MLOCK = switch (native_os) {
16221622pub const MSF = switch (native_os) {
16231623 .linux => linux.MSF,
16241624 .emscripten => emscripten.MSF,
1625 .macos, .ios, .tvos, .watchos, .visionos => struct {
1625 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
16261626 pub const ASYNC = 0x1;
16271627 pub const INVALIDATE = 0x2;
16281628 /// invalidate, leave mapped
......@@ -1651,7 +1651,7 @@ pub const NAME_MAX = switch (native_os) {
16511651 // character, but POSIX definition says that NAME_MAX does not include the
16521652 // terminating null.
16531653 // https://github.com/SerenityOS/serenity/blob/c87557e9c1865fa1a6440de34ff6ce6fc858a2b7/Kernel/API/POSIX/sys/limits.h#L20
1654 .haiku, .openbsd, .dragonfly, .netbsd, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 255,
1654 .haiku, .openbsd, .dragonfly, .netbsd, .illumos, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 255,
16551655 else => {},
16561656};
16571657pub const PATH_MAX = switch (native_os) {
......@@ -1659,7 +1659,7 @@ pub const PATH_MAX = switch (native_os) {
16591659 .emscripten => emscripten.PATH_MAX,
16601660 .wasi => 4096,
16611661 .windows => 260,
1662 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 1024,
1662 .openbsd, .haiku, .dragonfly, .netbsd, .illumos, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 1024,
16631663 else => {},
16641664};
16651665
......@@ -1676,7 +1676,7 @@ pub const POLL = switch (native_os) {
16761676 pub const NVAL = 0x4000;
16771677 },
16781678 .windows => ws2_32.POLL,
1679 .macos, .ios, .tvos, .watchos, .visionos => struct {
1679 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
16801680 pub const IN = 0x001;
16811681 pub const PRI = 0x002;
16821682 pub const OUT = 0x004;
......@@ -1823,7 +1823,7 @@ pub const PROT = switch (native_os) {
18231823 /// page can be executed
18241824 pub const EXEC = 0x4;
18251825 },
1826 .macos, .ios, .tvos, .watchos, .visionos => struct {
1826 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
18271827 /// [MC2] no permissions
18281828 pub const NONE: vm_prot_t = 0x00;
18291829 /// [MC2] pages can be read
......@@ -1846,7 +1846,7 @@ pub const RLIM = switch (native_os) {
18461846 .linux => linux.RLIM,
18471847 .emscripten => emscripten.RLIM,
18481848 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L52
1849 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => struct {
1849 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {
18501850 /// No limit
18511851 pub const INFINITY: rlim_t = (1 << 63) - 1;
18521852
......@@ -1903,7 +1903,7 @@ pub const S = switch (native_os) {
19031903 return m & IFMT == IFSOCK;
19041904 }
19051905 },
1906 .macos, .ios, .tvos, .watchos, .visionos => struct {
1906 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
19071907 pub const IFMT = 0o170000;
19081908
19091909 pub const IFIFO = 0o010000;
......@@ -2396,7 +2396,7 @@ pub const S = switch (native_os) {
23962396pub const SA = switch (native_os) {
23972397 .linux => linux.SA,
23982398 .emscripten => emscripten.SA,
2399 .macos, .ios, .tvos, .watchos, .visionos => struct {
2399 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
24002400 /// take signal on signal stack
24012401 pub const ONSTACK = 0x0001;
24022402 /// restart system on signal return
......@@ -2502,7 +2502,7 @@ pub const _SC = if (builtin.abi.isAndroid()) enum(c_int) {
25022502 PAGESIZE = 39,
25032503 NPROCESSORS_ONLN = 97,
25042504} else switch (native_os) {
2505 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => enum(c_int) {
2505 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
25062506 PAGESIZE = 29,
25072507 },
25082508 .dragonfly => enum(c_int) {
......@@ -2562,7 +2562,7 @@ pub const SEEK = switch (native_os) {
25622562 pub const END: wasi.whence_t = .END;
25632563 },
25642564 // https://github.com/SerenityOS/serenity/blob/808ce594db1f2190e5212a250e900bde2ffe710b/Kernel/API/POSIX/stdio.h#L15-L17
2565 .openbsd, .haiku, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows, .serenity => struct {
2565 .openbsd, .haiku, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .windows, .serenity => struct {
25662566 pub const SET = 0;
25672567 pub const CUR = 1;
25682568 pub const END = 2;
......@@ -2622,7 +2622,7 @@ pub const SIG = switch (native_os) {
26222622 /// Signal error value (returned by signal call on error)
26232623 pub const ERR = -1;
26242624 },
2625 .macos, .ios, .tvos, .watchos, .visionos => enum(u32) {
2625 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(u32) {
26262626 pub const ERR: ?Sigaction.handler_fn = @ptrFromInt(maxInt(usize));
26272627 pub const DFL: ?Sigaction.handler_fn = @ptrFromInt(0);
26282628 pub const IGN: ?Sigaction.handler_fn = @ptrFromInt(1);
......@@ -3185,7 +3185,7 @@ pub const Sigaction = switch (native_os) {
31853185 else => common_linux_Sigaction,
31863186 },
31873187 .emscripten => emscripten.Sigaction,
3188 .netbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
3188 .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
31893189 pub const handler_fn = *align(1) const fn (SIG) callconv(.c) void;
31903190 pub const sigaction_fn = *const fn (SIG, *const siginfo_t, ?*anyopaque) callconv(.c) void;
31913191
......@@ -3273,7 +3273,7 @@ pub const Sigaction = switch (native_os) {
32733273};
32743274pub const T = switch (native_os) {
32753275 .linux => linux.T,
3276 .macos, .ios, .tvos, .watchos, .visionos => struct {
3276 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
32773277 pub const IOCGWINSZ = ior(0x40000000, 't', 104, @sizeOf(winsize));
32783278
32793279 fn ior(inout: u32, group_arg: usize, num: usize, len: usize) usize {
......@@ -3664,7 +3664,7 @@ pub const T = switch (native_os) {
36643664};
36653665pub const IOCPARM_MASK = switch (native_os) {
36663666 .windows => ws2_32.IOCPARM_MASK,
3667 .macos, .ios, .tvos, .watchos, .visionos => 0x1fff,
3667 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 0x1fff,
36683668 else => void,
36693669};
36703670pub const TCSA = std.posix.TCSA;
......@@ -3679,7 +3679,7 @@ pub const VDSO = switch (native_os) {
36793679pub const W = switch (native_os) {
36803680 .linux => linux.W,
36813681 .emscripten => emscripten.W,
3682 .macos, .ios, .tvos, .watchos, .visionos => struct {
3682 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
36833683 /// [XSI] no hang in wait/no child to reap
36843684 pub const NOHANG = 0x00000001;
36853685 /// [XSI] notify on stop, untraced child
......@@ -3939,7 +3939,7 @@ pub const accept_filter_arg = switch (native_os) {
39393939 // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/6098912863ed4c7b3f70d7483910ce2956cf4ed3/sys/sys/socket.h#L164
39403940 // https://github.com/NetBSD/src/blob/cad5c68a8524927f65e22ad651de3905382be6e0/sys/sys/socket.h#L188
39413941 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L504
3942 .freebsd, .dragonfly, .netbsd, .macos, .driverkit, .ios, .tvos, .watchos, .visionos => extern struct {
3942 .freebsd, .dragonfly, .netbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
39433943 name: [16]u8,
39443944 arg: [240]u8,
39453945 },
......@@ -3948,7 +3948,7 @@ pub const accept_filter_arg = switch (native_os) {
39483948pub const clock_t = switch (native_os) {
39493949 .linux => linux.clock_t,
39503950 .emscripten => emscripten.clock_t,
3951 .macos, .ios, .tvos, .watchos, .visionos => c_ulong,
3951 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_ulong,
39523952 .freebsd => isize,
39533953 .openbsd, .illumos => i64,
39543954 .netbsd => u32,
......@@ -4034,7 +4034,7 @@ pub const in_pktinfo = switch (native_os) {
40344034 .linux => linux.in_pktinfo,
40354035 // https://github.com/illumos/illumos-gate/blob/608eb926e14f4ba4736b2d59e891335f1cba9e1e/usr/src/uts/common/netinet/in.h#L1132
40364036 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet/in.h#L696
4037 .illumos, .driverkit, .ios, .macos, .tvos, .watchos, .visionos => extern struct {
4037 .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
40384038 ifindex: u32,
40394039 spec_dst: u32,
40404040 addr: u32,
......@@ -4051,7 +4051,7 @@ pub const in6_pktinfo = switch (native_os) {
40514051 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/netinet6/in6.h#L737
40524052 // https://github.com/haiku/haiku/blob/2aab5f5f14aeb3f34c3a3d9a9064cc3c0d914bea/headers/posix/netinet6/in6.h#L63
40534053 // https://github.com/SerenityOS/serenity/blob/5bd8af99be0bc4b2e14f361fd7d7590e6bcfa4d6/Kernel/API/POSIX/sys/socket.h#L122
4054 .freebsd, .dragonfly, .netbsd, .openbsd, .illumos, .driverkit, .ios, .macos, .tvos, .watchos, .visionos, .haiku, .serenity => extern struct {
4054 .freebsd, .dragonfly, .netbsd, .openbsd, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku, .serenity => extern struct {
40554055 addr: [16]u8,
40564056 ifindex: u32,
40574057 },
......@@ -4084,10 +4084,11 @@ pub const linger = switch (native_os) {
40844084 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L498
40854085 .driverkit,
40864086 .ios,
4087 .maccatalyst,
40874088 .macos,
40884089 .tvos,
4089 .watchos,
40904090 .visionos,
4091 .watchos,
40914092 => extern struct {
40924093 onoff: i32, // non-zero to linger on close
40934094 linger: i32, // time to linger in seconds
......@@ -4104,9 +4105,10 @@ pub const msghdr = switch (native_os) {
41044105 .netbsd,
41054106 .haiku,
41064107 .illumos,
4107 .macos,
41084108 .driverkit,
41094109 .ios,
4110 .maccatalyst,
4111 .macos,
41104112 .tvos,
41114113 .visionos,
41124114 .watchos,
......@@ -4139,9 +4141,10 @@ pub const msghdr_const = switch (native_os) {
41394141 .netbsd,
41404142 .haiku,
41414143 .illumos,
4142 .macos,
41434144 .driverkit,
41444145 .ios,
4146 .maccatalyst,
4147 .macos,
41454148 .tvos,
41464149 .visionos,
41474150 .watchos,
......@@ -4191,9 +4194,10 @@ pub const cmsghdr = switch (native_os) {
41914194 // https://github.com/haiku/haiku/blob/b54f586058fd6623645512e4631468cede9933b9/headers/posix/sys/socket.h#L132
41924195 .haiku,
41934196 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1041
4194 .macos,
41954197 .driverkit,
41964198 .ios,
4199 .maccatalyst,
4200 .macos,
41974201 .tvos,
41984202 .visionos,
41994203 .watchos,
......@@ -4215,7 +4219,7 @@ pub const nfds_t = switch (native_os) {
42154219 .emscripten => emscripten.nfds_t,
42164220 .haiku, .illumos, .wasi => usize,
42174221 .windows => c_ulong,
4218 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u32,
4222 .openbsd, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u32,
42194223 // https://github.com/SerenityOS/serenity/blob/265764ff2fec038855193296588a887fc322d76a/Kernel/API/POSIX/poll.h#L32
42204224 .serenity => c_uint,
42214225 else => void,
......@@ -4251,7 +4255,7 @@ pub const pollfd = switch (native_os) {
42514255pub const rlim_t = switch (native_os) {
42524256 .linux => linux.rlim_t,
42534257 .emscripten => emscripten.rlim_t,
4254 .openbsd, .netbsd, .illumos, .macos, .ios, .tvos, .watchos, .visionos => u64,
4258 .openbsd, .netbsd, .illumos, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u64,
42554259 .haiku, .dragonfly, .freebsd => i64,
42564260 // https://github.com/SerenityOS/serenity/blob/aae106e37b48f2158e68902293df1e4bf7b80c0f/Userland/Libraries/LibC/sys/resource.h#L54
42574261 .serenity => usize,
......@@ -4271,7 +4275,7 @@ pub const rlimit = switch (native_os) {
42714275pub const rlimit_resource = switch (native_os) {
42724276 .linux => linux.rlimit_resource,
42734277 .emscripten => emscripten.rlimit_resource,
4274 .openbsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {
4278 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
42754279 CPU = 0,
42764280 FSIZE = 1,
42774281 DATA = 2,
......@@ -4378,7 +4382,7 @@ pub const rlimit_resource = switch (native_os) {
43784382pub const rusage = switch (native_os) {
43794383 .linux => linux.rusage,
43804384 .emscripten => emscripten.rusage,
4381 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
4385 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
43824386 utime: timeval,
43834387 stime: timeval,
43844388 maxrss: isize,
......@@ -4449,7 +4453,7 @@ pub const rusage = switch (native_os) {
44494453pub const siginfo_t = switch (native_os) {
44504454 .linux => linux.siginfo_t,
44514455 .emscripten => emscripten.siginfo_t,
4452 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
4456 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
44534457 signo: SIG,
44544458 errno: c_int,
44554459 code: c_int,
......@@ -4639,7 +4643,7 @@ pub const sigset_t = switch (native_os) {
46394643 .emscripten => emscripten.sigset_t,
46404644 // https://github.com/SerenityOS/serenity/blob/ec492a1a0819e6239ea44156825c4ee7234ca3db/Kernel/API/POSIX/signal.h#L19
46414645 .openbsd, .serenity => u32,
4642 .macos, .ios, .tvos, .watchos, .visionos => darwin.sigset_t,
4646 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.sigset_t,
46434647 .dragonfly, .netbsd, .illumos, .freebsd => extern struct {
46444648 __bits: [SIG.WORDS]u32,
46454649 },
......@@ -4669,7 +4673,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {
46694673} else switch (native_os) {
46704674 .linux, .emscripten => linux.addrinfo,
46714675 .windows => ws2_32.addrinfo,
4672 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
4676 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
46734677 flags: AI,
46744678 family: i32,
46754679 socktype: i32,
......@@ -4735,7 +4739,7 @@ pub const addrinfo = if (builtin.abi.isAndroid()) extern struct {
47354739pub const sockaddr = switch (native_os) {
47364740 .linux, .emscripten => linux.sockaddr,
47374741 .windows => ws2_32.sockaddr,
4738 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
4742 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
47394743 len: u8,
47404744 family: sa_family_t,
47414745 data: [14]u8,
......@@ -5077,7 +5081,7 @@ pub const in_port_t = u16;
50775081pub const sa_family_t = switch (native_os) {
50785082 .linux, .emscripten => linux.sa_family_t,
50795083 .windows => ws2_32.ADDRESS_FAMILY,
5080 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u8,
5084 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => u8,
50815085 // https://github.com/SerenityOS/serenity/blob/ac44ec5ebc707f9dd0c3d4759a1e17e91db5d74f/Kernel/API/POSIX/sys/socket.h#L66
50825086 .illumos, .serenity => u16,
50835087 else => void,
......@@ -5130,7 +5134,7 @@ pub const AF = if (builtin.abi.isAndroid()) struct {
51305134} else switch (native_os) {
51315135 .linux, .emscripten => linux.AF,
51325136 .windows => ws2_32.AF,
5133 .macos, .ios, .tvos, .watchos, .visionos => struct {
5137 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
51345138 pub const UNSPEC = 0;
51355139 pub const LOCAL = 1;
51365140 pub const UNIX = LOCAL;
......@@ -5416,7 +5420,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {
54165420 pub const PF_MAX = AF.MAX;
54175421} else switch (native_os) {
54185422 .linux, .emscripten => linux.PF,
5419 .macos, .ios, .tvos, .watchos, .visionos => struct {
5423 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
54205424 pub const UNSPEC = AF.UNSPEC;
54215425 pub const LOCAL = AF.LOCAL;
54225426 pub const UNIX = PF.LOCAL;
......@@ -5650,7 +5654,7 @@ pub const PF = if (builtin.abi.isAndroid()) struct {
56505654pub const DT = switch (native_os) {
56515655 .linux => linux.DT,
56525656 // https://github.com/SerenityOS/serenity/blob/1262a7d1424d0d2e89d80644409721cbf056ab17/Kernel/API/POSIX/dirent.h#L16-L35
5653 .netbsd, .freebsd, .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => struct {
5657 .netbsd, .freebsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => struct {
56545658 pub const UNKNOWN = 0;
56555659 pub const FIFO = 1;
56565660 pub const CHR = 2;
......@@ -5679,7 +5683,7 @@ pub const MSG = switch (native_os) {
56795683 .linux => linux.MSG,
56805684 .emscripten => emscripten.MSG,
56815685 .windows => ws2_32.MSG,
5682 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => darwin.MSG,
5686 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.MSG,
56835687 .haiku => struct {
56845688 pub const OOB = 0x0001;
56855689 pub const PEEK = 0x0002;
......@@ -5796,7 +5800,7 @@ pub const SOCK = switch (native_os) {
57965800 .linux => linux.SOCK,
57975801 .emscripten => emscripten.SOCK,
57985802 .windows => ws2_32.SOCK,
5799 .macos, .ios, .tvos, .watchos, .visionos => struct {
5803 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
58005804 pub const STREAM = 1;
58015805 pub const DGRAM = 2;
58025806 pub const RAW = 3;
......@@ -5897,7 +5901,7 @@ pub const SOCK = switch (native_os) {
58975901 else => void,
58985902};
58995903pub const TCP = switch (native_os) {
5900 .macos => darwin.TCP,
5904 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.TCP,
59015905 .linux => linux.TCP,
59025906 .emscripten => emscripten.TCP,
59035907 .windows => ws2_32.TCP,
......@@ -5911,7 +5915,7 @@ pub const TCP = switch (native_os) {
59115915pub const IPPROTO = switch (native_os) {
59125916 .linux, .emscripten => linux.IPPROTO,
59135917 .windows => ws2_32.IPPROTO,
5914 .macos, .ios, .tvos, .watchos, .visionos => struct {
5918 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
59155919 pub const ICMP = 1;
59165920 pub const ICMPV6 = 58;
59175921 pub const TCP = 6;
......@@ -6543,7 +6547,7 @@ pub const SOL = switch (native_os) {
65436547 .linux => linux.SOL,
65446548 .emscripten => emscripten.SOL,
65456549 .windows => ws2_32.SOL,
6546 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
6550 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
65476551 pub const SOCKET = 0xffff;
65486552 },
65496553 .illumos => struct {
......@@ -6562,7 +6566,7 @@ pub const SO = switch (native_os) {
65626566 .linux => linux.SO,
65636567 .emscripten => emscripten.SO,
65646568 .windows => ws2_32.SO,
6565 .macos, .ios, .tvos, .watchos, .visionos => struct {
6569 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
65666570 pub const DEBUG = 0x0001;
65676571 pub const ACCEPTCONN = 0x0002;
65686572 pub const REUSEADDR = 0x0004;
......@@ -6807,7 +6811,7 @@ pub const SOMAXCONN = switch (native_os) {
68076811 // https://github.com/NetBSD/src/blob/a673fb3f8487e974c669216064f7588207229fea/sys/sys/socket.h#L472
68086812 // https://github.com/openbsd/src/blob/8ba9cd88f10123fef7af805b8e5ccc2463ad8fa4/sys/sys/socket.h#L483
68096813 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L815
6810 .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .macos, .ios, .tvos, .watchos, .visionos => 128,
6814 .freebsd, .dragonfly, .netbsd, .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 128,
68116815 else => void,
68126816};
68136817pub const SCM = switch (native_os) {
......@@ -6856,7 +6860,7 @@ pub const SCM = switch (native_os) {
68566860 pub const TIMESTAMP = 0x04;
68576861 },
68586862 // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/socket.h#L1114
6859 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => struct {
6863 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
68606864 pub const RIGHTS = 1;
68616865 pub const TIMESTAMP = 2;
68626866 pub const CREDS = 3;
......@@ -6870,7 +6874,7 @@ pub const IFNAMESIZE = switch (native_os) {
68706874 .emscripten => emscripten.IFNAMESIZE,
68716875 .windows => 30,
68726876 // https://github.com/SerenityOS/serenity/blob/9882848e0bf783dfc8e8a6d887a848d70d9c58f4/Kernel/API/POSIX/net/if.h#L50
6873 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .serenity => 16,
6877 .openbsd, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => 16,
68746878 .illumos => 32,
68756879 else => {},
68766880};
......@@ -6921,7 +6925,7 @@ pub const timeval = switch (native_os) {
69216925 sec: c_long,
69226926 usec: c_long,
69236927 },
6924 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
6928 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
69256929 sec: c_long,
69266930 usec: i32,
69276931 },
......@@ -6941,7 +6945,7 @@ pub const timeval = switch (native_os) {
69416945pub const timezone = switch (native_os) {
69426946 .linux => linux.timezone,
69436947 .emscripten => emscripten.timezone,
6944 .openbsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
6948 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
69456949 minuteswest: i32,
69466950 dsttime: i32,
69476951 },
......@@ -6968,7 +6972,7 @@ pub const utsname = switch (native_os) {
69686972 machine: [256:0]u8,
69696973 domainname: [256:0]u8,
69706974 },
6971 .macos => extern struct {
6975 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
69726976 sysname: [255:0]u8,
69736977 nodename: [255:0]u8,
69746978 release: [255:0]u8,
......@@ -6999,7 +7003,7 @@ pub const _errno = switch (native_os) {
69997003 .emscripten => private.__errno_location,
70007004 .wasi, .dragonfly => private.errnoFromThreadLocal,
70017005 .windows => private._errno,
7002 .macos, .ios, .tvos, .watchos, .visionos, .freebsd => private.__error,
7006 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd => private.__error,
70037007 .illumos => private.___errno,
70047008 .openbsd, .netbsd => private.__errno,
70057009 .haiku => haiku._errnop,
......@@ -7070,7 +7074,7 @@ pub const RTLD = switch (native_os) {
70707074 TRACE: bool = false,
70717075 _: u22 = 0,
70727076 },
7073 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {
7077 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
70747078 LAZY: bool = false,
70757079 NOW: bool = false,
70767080 LOCAL: bool = false,
......@@ -7102,7 +7106,7 @@ pub const dirent = switch (native_os) {
71027106 type: u8,
71037107 name: [256]u8,
71047108 },
7105 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
7109 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
71067110 ino: u64,
71077111 seekoff: u64,
71087112 reclen: u16,
......@@ -7246,7 +7250,7 @@ pub const AI = if (builtin.abi.isAndroid()) packed struct(u32) {
72467250 ADDRCONFIG: bool = false,
72477251 _: u25 = 0,
72487252 },
7249 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {
7253 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
72507254 PASSIVE: bool = false,
72517255 CANONNAME: bool = false,
72527256 NUMERICHOST: bool = false,
......@@ -7363,7 +7367,7 @@ pub const EAI = if (builtin.abi.isAndroid()) enum(c_int) {
73637367
73647368 _,
73657369 },
7366 .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {
7370 .haiku, .dragonfly, .netbsd, .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => enum(c_int) {
73677371 /// address family for hostname not supported
73687372 ADDRFAMILY = 1,
73697373 /// temporary failure in name resolution
......@@ -7697,7 +7701,7 @@ pub const Stat = switch (native_os) {
76977701 };
76987702 }
76997703 },
7700 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
7704 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
77017705 dev: i32,
77027706 mode: u16,
77037707 nlink: u16,
......@@ -7940,7 +7944,7 @@ pub const pthread_mutex_t = switch (native_os) {
79407944 else => @compileError("unsupported ABI"),
79417945 };
79427946 },
7943 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
7947 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
79447948 sig: c_long = 0x32AAABA7,
79457949 data: [data_len]u8 = [_]u8{0} ** data_len,
79467950
......@@ -7997,7 +8001,7 @@ pub const pthread_cond_t = switch (native_os) {
79978001 .linux => extern struct {
79988002 data: [48]u8 align(@alignOf(usize)) = [_]u8{0} ** 48,
79998003 },
8000 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
8004 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
80018005 sig: c_long = 0x3CB0B1BB,
80028006 data: [data_len]u8 = [_]u8{0} ** data_len,
80038007 const data_len = if (@sizeOf(usize) == 8) 40 else 24;
......@@ -8056,7 +8060,7 @@ pub const pthread_rwlock_t = switch (native_os) {
80568060 data: [56]u8 align(@alignOf(usize)) = [_]u8{0} ** 56,
80578061 },
80588062 },
8059 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
8063 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
80608064 sig: c_long = 0x2DA8B3B4,
80618065 data: [192]u8 = [_]u8{0} ** 192,
80628066 },
......@@ -8108,7 +8112,7 @@ pub const pthread_attr_t = switch (native_os) {
81088112 __size: [56]u8,
81098113 __align: c_long,
81108114 },
8111 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
8115 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
81128116 __sig: c_long,
81138117 __opaque: [56]u8,
81148118 },
......@@ -8136,7 +8140,7 @@ pub const pthread_attr_t = switch (native_os) {
81368140
81378141pub const pthread_key_t = switch (native_os) {
81388142 .linux, .emscripten => c_uint,
8139 .macos, .ios, .tvos, .watchos, .visionos => c_ulong,
8143 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_ulong,
81408144 // https://github.com/SerenityOS/serenity/blob/b98f537f117b341788023ab82e0c11ca9ae29a57/Kernel/API/POSIX/sys/types.h#L65
81418145 .openbsd, .illumos, .serenity => c_int,
81428146 else => void,
......@@ -8169,7 +8173,7 @@ pub const sem_t = switch (native_os) {
81698173 .linux, .emscripten => extern struct {
81708174 __size: [4 * @sizeOf(usize)]u8 align(@alignOf(usize)),
81718175 },
8172 .macos, .ios, .tvos, .watchos, .visionos => c_int,
8176 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => c_int,
81738177 .freebsd => extern struct {
81748178 _magic: u32,
81758179 _kern: extern struct {
......@@ -8213,7 +8217,7 @@ pub const Kevent = switch (native_os) {
82138217 data: i64,
82148218 udata: usize,
82158219 },
8216 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
8220 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
82178221 ident: usize,
82188222 filter: i16,
82198223 flags: u16,
......@@ -8293,7 +8297,7 @@ pub const AT = switch (native_os) {
82938297 /// Remove directory instead of unlinking file
82948298 pub const REMOVEDIR = 0x200;
82958299 },
8296 .macos, .ios, .tvos, .watchos, .visionos => struct {
8300 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
82978301 pub const FDCWD = -2;
82988302 /// Use effective ids in access check
82998303 pub const EACCESS = 0x0010;
......@@ -8548,7 +8552,7 @@ pub const O = switch (native_os) {
85488552 DIRECTORY: bool = false,
85498553 _: u10 = 0,
85508554 },
8551 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {
8555 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
85528556 ACCMODE: std.posix.ACCMODE = .RDONLY,
85538557 NONBLOCK: bool = false,
85548558 APPEND: bool = false,
......@@ -8727,7 +8731,7 @@ pub const MAP = switch (native_os) {
87278731 NORESERVE: bool = false,
87288732 _: u27 = 0,
87298733 },
8730 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u32) {
8734 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u32) {
87318735 TYPE: enum(u4) {
87328736 SHARED = 0x01,
87338737 PRIVATE = 0x02,
......@@ -8812,7 +8816,7 @@ pub const cc_t = u8;
88128816/// Indices into the `cc` array in the `termios` struct.
88138817pub const V = switch (native_os) {
88148818 .linux => linux.V,
8815 .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .openbsd => enum {
8819 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .netbsd, .openbsd => enum {
88168820 EOF,
88178821 EOL,
88188822 EOL2,
......@@ -8932,7 +8936,7 @@ pub const V = switch (native_os) {
89328936
89338937pub const NCCS = switch (native_os) {
89348938 .linux => linux.NCCS,
8935 .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
8939 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
89368940 .haiku => 11,
89378941 .illumos => 19,
89388942 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L15
......@@ -8942,7 +8946,7 @@ pub const NCCS = switch (native_os) {
89428946
89438947pub const termios = switch (native_os) {
89448948 .linux => linux.termios,
8945 .macos, .ios, .tvos, .watchos, .visionos => extern struct {
8949 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
89468950 iflag: tc_iflag_t,
89478951 oflag: tc_oflag_t,
89488952 cflag: tc_cflag_t,
......@@ -8993,7 +8997,7 @@ pub const termios = switch (native_os) {
89938997
89948998pub const tc_iflag_t = switch (native_os) {
89958999 .linux => linux.tc_iflag_t,
8996 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
9000 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
89979001 IGNBRK: bool = false,
89989002 BRKINT: bool = false,
89999003 IGNPAR: bool = false,
......@@ -9104,7 +9108,7 @@ pub const tc_iflag_t = switch (native_os) {
91049108
91059109pub const tc_oflag_t = switch (native_os) {
91069110 .linux => linux.tc_oflag_t,
9107 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
9111 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
91089112 OPOST: bool = false,
91099113 ONLCR: bool = false,
91109114 OXTABS: bool = false,
......@@ -9202,7 +9206,7 @@ pub const CSIZE = switch (native_os) {
92029206
92039207pub const tc_cflag_t = switch (native_os) {
92049208 .linux => linux.tc_cflag_t,
9205 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
9209 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
92069210 CIGNORE: bool = false,
92079211 _1: u5 = 0,
92089212 CSTOPB: bool = false,
......@@ -9351,7 +9355,7 @@ pub const tc_cflag_t = switch (native_os) {
93519355
93529356pub const tc_lflag_t = switch (native_os) {
93539357 .linux => linux.tc_lflag_t,
9354 .macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
9358 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => packed struct(u64) {
93559359 ECHOKE: bool = false,
93569360 ECHOE: bool = false,
93579361 ECHOK: bool = false,
......@@ -9498,7 +9502,7 @@ pub const tc_lflag_t = switch (native_os) {
94989502
94999503pub const speed_t = switch (native_os) {
95009504 .linux => linux.speed_t,
9501 .macos, .ios, .tvos, .watchos, .visionos, .openbsd => enum(u64) {
9505 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .openbsd => enum(u64) {
95029506 B0 = 0,
95039507 B50 = 50,
95049508 B75 = 75,
......@@ -9693,7 +9697,7 @@ pub const NSIG = switch (native_os) {
96939697 .windows => 23,
96949698 .haiku => 65,
96959699 .netbsd, .freebsd => 32,
9696 .macos => darwin.NSIG,
9700 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.NSIG,
96979701 .illumos => 75,
96989702 // https://github.com/SerenityOS/serenity/blob/046c23f567a17758d762a33bdf04bacbfd088f9f/Kernel/API/POSIX/signal_numbers.h#L42
96999703 .openbsd, .serenity => 33,
......@@ -9701,7 +9705,7 @@ pub const NSIG = switch (native_os) {
97019705};
97029706
97039707pub const MINSIGSTKSZ = switch (native_os) {
9704 .macos, .ios, .tvos, .watchos, .visionos => 32768,
9708 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 32768,
97059709 .freebsd => switch (builtin.cpu.arch) {
97069710 .powerpc64, .powerpc64le, .x86, .x86_64 => 2048,
97079711 .arm, .aarch64, .riscv64 => 4096,
......@@ -9715,7 +9719,7 @@ pub const MINSIGSTKSZ = switch (native_os) {
97159719 else => {},
97169720};
97179721pub const SIGSTKSZ = switch (native_os) {
9718 .macos, .ios, .tvos, .watchos, .visionos => 131072,
9722 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => 131072,
97199723 .netbsd, .freebsd => MINSIGSTKSZ + 32768,
97209724 .illumos => 8192,
97219725 .haiku => 16384,
......@@ -9726,7 +9730,7 @@ pub const SIGSTKSZ = switch (native_os) {
97269730};
97279731pub const SS = switch (native_os) {
97289732 .linux => linux.SS,
9729 .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd => struct {
9733 .openbsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .netbsd, .freebsd => struct {
97309734 pub const ONSTACK = 1;
97319735 pub const DISABLE = 4;
97329736 },
......@@ -9739,7 +9743,7 @@ pub const SS = switch (native_os) {
97399743};
97409744
97419745pub const EV = switch (native_os) {
9742 .macos, .ios, .tvos, .watchos, .visionos => struct {
9746 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
97439747 /// add event to kq (implies enable)
97449748 pub const ADD = 0x0001;
97459749 /// delete event from kq
......@@ -9879,7 +9883,7 @@ pub const EV = switch (native_os) {
98799883};
98809884
98819885pub const EVFILT = switch (native_os) {
9882 .macos, .ios, .tvos, .watchos, .visionos => struct {
9886 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
98839887 pub const READ = -1;
98849888 pub const WRITE = -2;
98859889 /// attached to aio requests
......@@ -10002,7 +10006,7 @@ pub const EVFILT = switch (native_os) {
1000210006};
1000310007
1000410008pub const NOTE = switch (native_os) {
10005 .macos, .ios, .tvos, .watchos, .visionos => struct {
10009 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => struct {
1000610010 /// On input, TRIGGER causes the event to be triggered for output.
1000710011 pub const TRIGGER = 0x01000000;
1000810012 /// ignore input fflags
......@@ -10293,7 +10297,7 @@ pub extern "c" fn sigwait(set: ?*sigset_t, sig: ?*c_int) c_int;
1029310297pub extern "c" fn alarm(seconds: c_uint) c_uint;
1029410298
1029510299pub const close = switch (native_os) {
10296 .macos, .ios, .tvos, .watchos, .visionos => darwin.@"close$NOCANCEL",
10300 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.@"close$NOCANCEL",
1029710301 else => private.close,
1029810302};
1029910303
......@@ -10308,7 +10312,7 @@ pub const clock_gettime = switch (native_os) {
1030810312};
1030910313
1031010314pub const fstat = switch (native_os) {
10311 .macos => switch (native_arch) {
10315 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
1031210316 .x86_64 => private.@"fstat$INODE64",
1031310317 else => private.fstat,
1031410318 },
......@@ -10317,7 +10321,7 @@ pub const fstat = switch (native_os) {
1031710321};
1031810322
1031910323pub const fstatat = switch (native_os) {
10320 .macos => switch (native_arch) {
10324 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
1032110325 .x86_64 => private.@"fstatat$INODE64",
1032210326 else => private.fstatat,
1032310327 },
......@@ -10351,7 +10355,7 @@ pub extern "c" fn setrlimit64(resource: rlimit_resource, rlim: *const rlimit) c_
1035110355
1035210356pub const arc4random_buf = switch (native_os) {
1035310357 .linux => if (builtin.abi.isAndroid()) private.arc4random_buf else {},
10354 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .serenity, .macos, .ios, .tvos, .watchos, .visionos => private.arc4random_buf,
10358 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .serenity, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.arc4random_buf,
1035510359 else => {},
1035610360};
1035710361pub const getentropy = switch (native_os) {
......@@ -10404,7 +10408,7 @@ pub extern "c" fn ftruncate64(fd: c_int, length: off_t) c_int;
1040410408pub extern "c" fn fallocate(fd: fd_t, mode: c_int, offset: off_t, len: off_t) c_int;
1040510409pub const sendfile = switch (native_os) {
1040610410 .freebsd => freebsd.sendfile,
10407 .macos, .ios, .tvos, .watchos, .visionos => darwin.sendfile,
10411 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.sendfile,
1040810412 .linux => private.sendfile,
1040910413 else => {},
1041010414};
......@@ -10445,7 +10449,7 @@ pub extern "c" fn madvise(
1044510449) c_int;
1044610450
1044710451pub const getdirentries = switch (native_os) {
10448 .macos, .ios, .tvos, .watchos, .visionos => private.__getdirentries64,
10452 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.__getdirentries64,
1044910453 else => private.getdirentries,
1045010454};
1045110455
......@@ -10500,7 +10504,7 @@ pub const nanosleep = switch (native_os) {
1050010504};
1050110505
1050210506pub const readdir = switch (native_os) {
10503 .macos => switch (native_arch) {
10507 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
1050410508 .x86_64 => private.@"readdir$INODE64",
1050510509 else => private.readdir,
1050610510 },
......@@ -10509,7 +10513,7 @@ pub const readdir = switch (native_os) {
1050910513};
1051010514
1051110515pub const realpath = switch (native_os) {
10512 .macos, .ios, .tvos, .watchos, .visionos => private.@"realpath$DARWIN_EXTSN",
10516 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.@"realpath$DARWIN_EXTSN",
1051310517 else => private.realpath,
1051410518};
1051510519
......@@ -10573,7 +10577,7 @@ pub const socketpair = switch (native_os) {
1057310577};
1057410578
1057510579pub const stat = switch (native_os) {
10576 .macos => switch (native_arch) {
10580 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (native_arch) {
1057710581 .x86_64 => private.@"stat$INODE64",
1057810582 else => private.stat,
1057910583 },
......@@ -10585,7 +10589,7 @@ pub const _msize = switch (native_os) {
1058510589 else => {},
1058610590};
1058710591pub const malloc_size = switch (native_os) {
10588 .macos, .ios, .tvos, .watchos, .visionos, .serenity => private.malloc_size,
10592 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => private.malloc_size,
1058910593 else => {},
1059010594};
1059110595pub const malloc_usable_size = switch (native_os) {
......@@ -10593,7 +10597,7 @@ pub const malloc_usable_size = switch (native_os) {
1059310597 else => {},
1059410598};
1059510599pub const posix_memalign = switch (native_os) {
10596 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => private.posix_memalign,
10600 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => private.posix_memalign,
1059710601 else => {},
1059810602};
1059910603pub const sysconf = switch (native_os) {
......@@ -10602,7 +10606,7 @@ pub const sysconf = switch (native_os) {
1060210606};
1060310607
1060410608pub const sf_hdtr = switch (native_os) {
10605 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
10609 .freebsd, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => extern struct {
1060610610 headers: ?[*]const iovec_const,
1060710611 hdr_cnt: c_int,
1060810612 trailers: ?[*]const iovec_const,
......@@ -10661,15 +10665,17 @@ pub extern "c" fn wait4(pid: pid_t, status: ?*c_int, options: c_int, ru: ?*rusag
1066110665pub const fork = switch (native_os) {
1066210666 .dragonfly,
1066310667 .freebsd,
10664 .ios,
1066510668 .linux,
10669 .driverkit,
10670 .ios,
10671 .maccatalyst,
1066610672 .macos,
10673 .tvos,
10674 .visionos,
10675 .watchos,
1066710676 .netbsd,
1066810677 .openbsd,
1066910678 .illumos,
10670 .tvos,
10671 .watchos,
10672 .visionos,
1067310679 .haiku,
1067410680 .serenity,
1067510681 => private.fork,
......@@ -10813,7 +10819,7 @@ pub extern "c" fn pthread_getspecific(key: pthread_key_t) ?*anyopaque;
1081310819pub extern "c" fn pthread_setspecific(key: pthread_key_t, value: ?*anyopaque) c_int;
1081410820pub extern "c" fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *sigset_t) c_int;
1081510821pub const pthread_setname_np = switch (native_os) {
10816 .macos, .ios, .tvos, .watchos, .visionos => darwin.pthread_setname_np,
10822 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.pthread_setname_np,
1081710823 .illumos => illumos.pthread_setname_np,
1081810824 .netbsd => netbsd.pthread_setname_np,
1081910825 else => private.pthread_setname_np,
......@@ -10823,7 +10829,7 @@ pub extern "c" fn pthread_getname_np(thread: pthread_t, name: [*:0]u8, len: usiz
1082310829pub extern "c" fn pthread_kill(pthread_t, signal: SIG) c_int;
1082410830
1082510831pub const pthread_threadid_np = switch (native_os) {
10826 .macos, .ios, .tvos, .watchos, .visionos => private.pthread_threadid_np,
10832 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => private.pthread_threadid_np,
1082710833 else => {},
1082810834};
1082910835
......@@ -10831,7 +10837,7 @@ pub const caddr_t = ?[*]u8;
1083110837
1083210838pub const ptrace = switch (native_os) {
1083310839 .linux, .serenity => private.ptrace,
10834 .macos, .ios, .tvos, .watchos, .visionos => darwin.ptrace,
10840 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.ptrace,
1083510841 .dragonfly => dragonfly.ptrace,
1083610842 .freebsd => freebsd.ptrace,
1083710843 .netbsd => netbsd.ptrace,
......@@ -10850,7 +10856,7 @@ pub extern "c" fn sem_timedwait(sem: *sem_t, abs_timeout: *const timespec) c_int
1085010856pub extern "c" fn sem_getvalue(sem: *sem_t, sval: *c_int) c_int;
1085110857
1085210858pub const shm_open = switch (native_os) {
10853 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => darwin.shm_open,
10859 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => darwin.shm_open,
1085410860 else => private.shm_open,
1085510861};
1085610862pub extern "c" fn shm_unlink(name: [*:0]const u8) c_int;
lib/std/crypto/Certificate/Bundle.zig+1-1
......@@ -73,7 +73,7 @@ pub const RescanError = RescanLinuxError || RescanMacError || RescanWithPathErro
7373pub fn rescan(cb: *Bundle, gpa: Allocator, io: Io, now: Io.Timestamp) RescanError!void {
7474 switch (builtin.os.tag) {
7575 .linux => return rescanLinux(cb, gpa, io, now),
76 .macos => return rescanMac(cb, gpa, io, now),
76 .maccatalyst, .macos => return rescanMac(cb, gpa, io, now),
7777 .freebsd, .openbsd => return rescanWithPath(cb, gpa, io, now, "/etc/ssl/cert.pem"),
7878 .netbsd => return rescanWithPath(cb, gpa, io, now, "/etc/openssl/certs/ca-certificates.crt"),
7979 .dragonfly => return rescanWithPath(cb, gpa, io, now, "/usr/local/etc/ssl/cert.pem"),
lib/std/debug.zig+2
......@@ -1392,6 +1392,7 @@ pub const have_segfault_handling_support = switch (native_os) {
13921392
13931393 .driverkit,
13941394 .ios,
1395 .maccatalyst,
13951396 .macos,
13961397 .tvos,
13971398 .visionos,
......@@ -1487,6 +1488,7 @@ fn handleSegfaultPosix(sig: posix.SIG, info: *const posix.siginfo_t, ctx_ptr: ?*
14871488 .freebsd,
14881489 .driverkit,
14891490 .ios,
1491 .maccatalyst,
14901492 .macos,
14911493 .tvos,
14921494 .visionos,
lib/std/debug/cpu_context.zig+1-1
......@@ -2131,7 +2131,7 @@ const signal_ucontext_t = switch (native_os) {
21312131 },
21322132 },
21332133 // https://github.com/ziglang/zig/blob/60be67d3c0ba6ae15fa7115596734ab1e74fbcd3/lib/libc/include/any-macos-any/sys/_types/_ucontext.h
2134 .driverkit, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
2134 .driverkit, .ios, .maccatalyst, .macos, .tvos, .watchos, .visionos => extern struct {
21352135 _onstack: i32,
21362136 _sigmask: std.c.sigset_t,
21372137 _stack: std.c.stack_t,
lib/std/dynamic_library.zig+2-2
......@@ -16,7 +16,7 @@ pub const DynLib = struct {
1616 else
1717 DlDynLib,
1818 .windows => WindowsDynLib,
19 .macos, .tvos, .watchos, .ios, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly, .illumos => DlDynLib,
19 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .openbsd, .dragonfly, .illumos => DlDynLib,
2020 else => struct {
2121 const open = @compileError("unsupported platform");
2222 const openZ = @compileError("unsupported platform");
......@@ -675,7 +675,7 @@ test "dynamic_library" {
675675 const libname = switch (native_os) {
676676 .linux, .freebsd, .openbsd, .illumos => "invalid_so.so",
677677 .windows => "invalid_dll.dll",
678 .macos, .tvos, .watchos, .ios, .visionos => "invalid_dylib.dylib",
678 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => "invalid_dylib.dylib",
679679 else => return error.SkipZigTest,
680680 };
681681
lib/std/fs.zig+2-2
......@@ -52,7 +52,7 @@ pub const GetAppDataDirError = @import("fs/get_app_data_dir.zig").GetAppDataDirE
5252/// * On other platforms, `[]u8` file paths are opaque sequences of bytes with
5353/// no particular encoding.
5454pub const max_path_bytes = switch (native_os) {
55 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .illumos, .plan9, .emscripten, .wasi, .serenity => posix.PATH_MAX,
55 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .haiku, .illumos, .plan9, .emscripten, .wasi, .serenity => posix.PATH_MAX,
5656 // Each WTF-16LE code unit may be expanded to 3 WTF-8 bytes.
5757 // If it would require 4 WTF-8 bytes, then there would be a surrogate
5858 // pair in the WTF-16LE, and we (over)account 3 bytes for it that way.
......@@ -73,7 +73,7 @@ pub const max_path_bytes = switch (native_os) {
7373/// On WASI, file name components are encoded as valid UTF-8.
7474/// On other platforms, `[]u8` components are an opaque sequence of bytes with no particular encoding.
7575pub const max_name_bytes = switch (native_os) {
76 .linux, .macos, .ios, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity => posix.NAME_MAX,
76 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .openbsd, .netbsd, .dragonfly, .illumos, .serenity => posix.NAME_MAX,
7777 // Haiku's NAME_MAX includes the null terminator, so subtract one.
7878 .haiku => posix.NAME_MAX - 1,
7979 // Each WTF-16LE character may be expanded to 3 WTF-8 bytes.
lib/std/fs/Dir.zig+9-4
......@@ -39,7 +39,7 @@ const IteratorError = error{
3939} || posix.UnexpectedError;
4040
4141pub const Iterator = switch (native_os) {
42 .macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => struct {
42 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => struct {
4343 dir: Dir,
4444 seek: i64,
4545 buf: [1024]u8 align(@alignOf(posix.system.dirent)),
......@@ -55,7 +55,7 @@ pub const Iterator = switch (native_os) {
5555 /// with subsequent calls to `next`, as well as when this `Dir` is deinitialized.
5656 pub fn next(self: *Self) Error!?Entry {
5757 switch (native_os) {
58 .macos, .ios => return self.nextDarwin(),
58 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => return self.nextDarwin(),
5959 .freebsd, .netbsd, .dragonfly, .openbsd => return self.nextBsd(),
6060 .illumos => return self.nextIllumos(),
6161 else => @compileError("unimplemented"),
......@@ -612,8 +612,13 @@ pub fn iterateAssumeFirstIteration(self: Dir) Iterator {
612612
613613fn iterateImpl(self: Dir, first_iter_start_value: bool) Iterator {
614614 switch (native_os) {
615 .macos,
615 .driverkit,
616616 .ios,
617 .maccatalyst,
618 .macos,
619 .tvos,
620 .visionos,
621 .watchos,
617622 .freebsd,
618623 .netbsd,
619624 .dragonfly,
......@@ -1103,7 +1108,7 @@ pub fn deleteFileZ(self: Dir, sub_path_c: [*:0]const u8) DeleteFileError!void {
11031108 error.AccessDenied, error.PermissionDenied => |e| switch (native_os) {
11041109 // non-Linux POSIX systems return permission errors when trying to delete a
11051110 // directory, so we need to handle that case specifically and translate the error
1106 .macos, .ios, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => {
1111 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .freebsd, .netbsd, .dragonfly, .openbsd, .illumos => {
11071112 // Don't follow symlinks to match unlinkat (which acts on symlinks rather than follows them)
11081113 const fstat = posix.fstatatZ(self.fd, sub_path_c, posix.AT.SYMLINK_NOFOLLOW) catch return e;
11091114 const is_dir = fstat.mode & posix.S.IFMT == posix.S.IFDIR;
lib/std/fs/get_app_data_dir.zig+1-1
......@@ -23,7 +23,7 @@ pub fn getAppDataDir(allocator: mem.Allocator, appname: []const u8) GetAppDataDi
2323 defer allocator.free(local_app_data_dir);
2424 return fs.path.join(allocator, &[_][]const u8{ local_app_data_dir, appname });
2525 },
26 .macos => {
26 .maccatalyst, .macos => {
2727 const home_dir = posix.getenv("HOME") orelse {
2828 // TODO look in /etc/passwd
2929 return error.AppDataDirUnavailable;
lib/std/heap.zig+4-4
......@@ -83,7 +83,7 @@ pub fn defaultQueryPageSize() usize {
8383 @max(std.c.sysconf(@intFromEnum(std.c._SC.PAGESIZE)), 0)
8484 else
8585 std.os.linux.getauxval(std.elf.AT_PAGESZ),
86 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
86 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
8787 const task_port = std.c.mach_task_self();
8888 // mach_task_self may fail "if there are any resource failures or other errors".
8989 if (task_port == std.c.TASK.NULL) break :size 0;
......@@ -155,7 +155,7 @@ const CAllocator = struct {
155155 else {};
156156
157157 pub const supports_posix_memalign = switch (builtin.os.tag) {
158 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .macos, .ios, .tvos, .watchos, .visionos, .serenity => true,
158 .dragonfly, .netbsd, .freebsd, .illumos, .openbsd, .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .serenity => true,
159159 else => false,
160160 };
161161
......@@ -703,7 +703,7 @@ pub fn testAllocatorAlignedShrink(base_allocator: mem.Allocator) !void {
703703}
704704
705705const page_size_min_default: ?usize = switch (builtin.os.tag) {
706 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
706 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
707707 .x86_64 => 4 << 10,
708708 .aarch64 => 16 << 10,
709709 else => null,
......@@ -862,7 +862,7 @@ const page_size_min_default: ?usize = switch (builtin.os.tag) {
862862};
863863
864864const page_size_max_default: ?usize = switch (builtin.os.tag) {
865 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
865 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (builtin.cpu.arch) {
866866 .x86_64 => 4 << 10,
867867 .aarch64 => 16 << 10,
868868 else => null,
lib/std/math/modf.zig+1-1
......@@ -85,7 +85,7 @@ fn ModfTests(comptime T: type) type {
8585 try expectApproxEqAbs(expected_c, r.fpart, epsilon);
8686 }
8787 test "vector" {
88 if (builtin.os.tag == .macos and builtin.cpu.arch == .aarch64) return error.SkipZigTest;
88 if (builtin.os.tag.isDarwin() and builtin.cpu.arch == .aarch64) return error.SkipZigTest;
8989 if (builtin.cpu.arch == .s390x) return error.SkipZigTest;
9090 if (comptime builtin.cpu.has(.loongarch, .lsx)) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/159529
9191
lib/std/os.zig+5-3
......@@ -74,11 +74,13 @@ pub fn accessW(path: [*:0]const u16) windows.GetFileAttributesError!void {
7474pub fn isGetFdPathSupportedOnTarget(os: std.Target.Os) bool {
7575 return switch (os.tag) {
7676 .windows,
77 .macos,
77 .driverkit,
7878 .ios,
79 .watchos,
79 .maccatalyst,
80 .macos,
8081 .tvos,
8182 .visionos,
83 .watchos,
8284 .linux,
8385 .illumos,
8486 .freebsd,
......@@ -113,7 +115,7 @@ pub fn getFdPath(fd: std.posix.fd_t, out_buffer: *[max_path_bytes]u8) std.posix.
113115 const end_index = std.unicode.wtf16LeToWtf8(out_buffer, wide_slice);
114116 return out_buffer[0..end_index];
115117 },
116 .macos, .ios, .watchos, .tvos, .visionos => {
118 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
117119 // On macOS, we can use F.GETPATH fcntl command to query the OS for
118120 // the path to the file descriptor.
119121 @memset(out_buffer[0..max_path_bytes], 0);
lib/std/posix.zig+8-8
......@@ -861,7 +861,7 @@ pub fn read(fd: fd_t, buf: []u8) ReadError!usize {
861861 // Prevents EINVAL.
862862 const max_count = switch (native_os) {
863863 .linux => 0x7ffff000,
864 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),
864 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
865865 else => maxInt(isize),
866866 };
867867 while (true) {
......@@ -1002,7 +1002,7 @@ pub fn pread(fd: fd_t, buf: []u8, offset: u64) PReadError!usize {
10021002 // Prevent EINVAL.
10031003 const max_count = switch (native_os) {
10041004 .linux => 0x7ffff000,
1005 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),
1005 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
10061006 else => maxInt(isize),
10071007 };
10081008
......@@ -1115,7 +1115,7 @@ pub fn ftruncate(fd: fd_t, length: u64) TruncateError!void {
11151115/// On these systems, the read races with concurrent writes to the same file descriptor.
11161116pub fn preadv(fd: fd_t, iov: []const iovec, offset: u64) PReadError!usize {
11171117 const have_pread_but_not_preadv = switch (native_os) {
1118 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
1118 .windows, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku => true,
11191119 else => false,
11201120 };
11211121 if (have_pread_but_not_preadv) {
......@@ -1269,7 +1269,7 @@ pub fn write(fd: fd_t, bytes: []const u8) WriteError!usize {
12691269
12701270 const max_count = switch (native_os) {
12711271 .linux => 0x7ffff000,
1272 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),
1272 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
12731273 else => maxInt(isize),
12741274 };
12751275 while (true) {
......@@ -1433,7 +1433,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
14331433 // Prevent EINVAL.
14341434 const max_count = switch (native_os) {
14351435 .linux => 0x7ffff000,
1436 .macos, .ios, .watchos, .tvos, .visionos => maxInt(i32),
1436 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => maxInt(i32),
14371437 else => maxInt(isize),
14381438 };
14391439
......@@ -1487,7 +1487,7 @@ pub fn pwrite(fd: fd_t, bytes: []const u8, offset: u64) PWriteError!usize {
14871487/// If `iov.len` is larger than `IOV_MAX`, a partial write will occur.
14881488pub fn pwritev(fd: fd_t, iov: []const iovec_const, offset: u64) PWriteError!usize {
14891489 const have_pwrite_but_not_pwritev = switch (native_os) {
1490 .windows, .macos, .ios, .watchos, .tvos, .visionos, .haiku => true,
1490 .windows, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos, .haiku => true,
14911491 else => false,
14921492 };
14931493
......@@ -1747,7 +1747,7 @@ pub fn execveZ(
17471747 .NOTDIR => return error.NotDir,
17481748 .TXTBSY => return error.FileBusy,
17491749 else => |err| switch (native_os) {
1750 .macos, .ios, .tvos, .watchos, .visionos => switch (err) {
1750 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (err) {
17511751 .BADEXEC => return error.InvalidExe,
17521752 .BADARCH => return error.InvalidExe,
17531753 else => return unexpectedErrno(err),
......@@ -6570,7 +6570,7 @@ pub fn ptrace(request: u32, pid: pid_t, addr: usize, data: usize) PtraceError!vo
65706570 else => |err| return unexpectedErrno(err),
65716571 },
65726572
6573 .macos, .ios, .tvos, .watchos, .visionos => switch (errno(std.c.ptrace(
6573 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => switch (errno(std.c.ptrace(
65746574 @enumFromInt(request),
65756575 pid,
65766576 @ptrFromInt(addr),
lib/std/posix/test.zig+2-2
......@@ -521,7 +521,7 @@ test "getrlimit and setrlimit" {
521521}
522522
523523test "sigrtmin/max" {
524 if (native_os == .wasi or native_os == .windows or native_os == .macos) {
524 if (native_os == .wasi or native_os == .windows or native_os.isDarwin()) {
525525 return error.SkipZigTest;
526526 }
527527
......@@ -550,7 +550,7 @@ test "sigset empty/full" {
550550// Some signals (i.e., 32 - 34 on glibc/musl) are not allowed to be added to a
551551// sigset by the C library, so avoid testing them.
552552fn reserved_signo(i: usize) bool {
553 if (native_os == .macos) return false;
553 if (native_os.isDarwin()) return false;
554554 if (!builtin.link_libc) return false;
555555 const max = if (native_os == .netbsd) 32 else 31;
556556 return i > max and i < posix.sigrtmin();
lib/std/process.zig+8-6
......@@ -1530,11 +1530,13 @@ pub const UserInfo = struct {
15301530pub fn getUserInfo(name: []const u8) !UserInfo {
15311531 return switch (native_os) {
15321532 .linux,
1533 .driverkit,
1534 .ios,
1535 .maccatalyst,
15331536 .macos,
1534 .watchos,
1535 .visionos,
15361537 .tvos,
1537 .ios,
1538 .visionos,
1539 .watchos,
15381540 .freebsd,
15391541 .netbsd,
15401542 .openbsd,
......@@ -1666,7 +1668,7 @@ pub fn getBaseAddress() usize {
16661668 else => {},
16671669 } else unreachable;
16681670 },
1669 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
1671 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
16701672 return @intFromPtr(&std.c._mh_execute_header);
16711673 },
16721674 .windows => return @intFromPtr(windows.kernel32.GetModuleHandleW(null)),
......@@ -1682,7 +1684,7 @@ pub const can_execv = switch (native_os) {
16821684
16831685/// Tells whether spawning child processes is supported (e.g. via Child)
16841686pub const can_spawn = switch (native_os) {
1685 .wasi, .watchos, .tvos, .visionos => false,
1687 .wasi, .ios, .tvos, .visionos, .watchos => false,
16861688 else => true,
16871689};
16881690
......@@ -1770,7 +1772,7 @@ pub fn totalSystemMemory() TotalSystemMemoryError!u64 {
17701772 return @as(u64, @intCast(physmem));
17711773 },
17721774 // whole Darwin family
1773 .driverkit, .ios, .macos, .tvos, .visionos, .watchos => {
1775 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
17741776 // "hw.memsize" returns uint64_t
17751777 var physmem: u64 = undefined;
17761778 var len: usize = @sizeOf(u64);
lib/std/process/Child.zig+3-3
......@@ -136,7 +136,7 @@ pub const ResourceUsageStatistics = struct {
136136 return null;
137137 }
138138 },
139 .macos, .ios => {
139 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
140140 if (rus.rusage) |ru| {
141141 // Darwin oddly reports in bytes instead of kilobytes.
142142 return @as(usize, @intCast(ru.maxrss));
......@@ -149,7 +149,7 @@ pub const ResourceUsageStatistics = struct {
149149 }
150150
151151 const rusage_init = switch (native_os) {
152 .linux, .macos, .ios => @as(?posix.rusage, null),
152 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => @as(?posix.rusage, null),
153153 .windows => @as(?windows.VM_COUNTERS, null),
154154 else => {},
155155 };
......@@ -486,7 +486,7 @@ fn waitUnwrappedPosix(self: *ChildProcess) void {
486486 const res: posix.WaitPidResult = res: {
487487 if (self.request_resource_usage_statistics) {
488488 switch (native_os) {
489 .linux, .macos, .ios => {
489 .linux, .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => {
490490 var ru: posix.rusage = undefined;
491491 const res = posix.wait4(self.id, 0, &ru);
492492 self.resource_usage_statistics.rusage = ru;
lib/std/time.zig+1-1
......@@ -76,7 +76,7 @@ pub const Instant = struct {
7676 },
7777 // On darwin, use UPTIME_RAW instead of MONOTONIC as it ticks while
7878 // suspended.
79 .macos, .ios, .tvos, .watchos, .visionos => posix.CLOCK.UPTIME_RAW,
79 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => posix.CLOCK.UPTIME_RAW,
8080 // On freebsd derivatives, use MONOTONIC_FAST as currently there's
8181 // no precision tradeoff.
8282 .freebsd, .dragonfly => posix.CLOCK.MONOTONIC_FAST,
lib/std/zig/LibCDirs.zig+1-2
......@@ -227,7 +227,7 @@ pub fn detectFromBuilding(
227227fn libCGenericName(target: *const std.Target) [:0]const u8 {
228228 switch (target.os.tag) {
229229 .windows => return "mingw",
230 .macos, .ios, .tvos, .watchos, .visionos => return "darwin",
230 .driverkit, .ios, .maccatalyst, .macos, .tvos, .visionos, .watchos => return "darwin",
231231 .freebsd => return "freebsd",
232232 .netbsd => return "netbsd",
233233 else => {},
......@@ -263,7 +263,6 @@ fn libCGenericName(target: *const std.Target) [:0]const u8 {
263263 .msvc,
264264 .itanium,
265265 .simulator,
266 .macabi,
267266 => unreachable,
268267 }
269268}
lib/std/zig/system.zig+1-1
......@@ -81,7 +81,7 @@ pub fn getExternalExecutor(
8181 // If the OS match and OS is macOS and CPU is arm64, we can use Rosetta 2
8282 // to emulate the foreign architecture.
8383 if (options.allow_rosetta and os_match and
84 host.os.tag == .macos and host.cpu.arch == .aarch64)
84 (host.os.tag == .maccatalyst or host.os.tag == .macos) and host.cpu.arch == .aarch64)
8585 {
8686 switch (candidate.cpu.arch) {
8787 .x86_64 => return .rosetta,
lib/std/zig/system/darwin.zig+2-6
......@@ -37,13 +37,9 @@ pub fn isSdkInstalled(allocator: Allocator) bool {
3737pub fn getSdk(allocator: Allocator, target: *const Target) ?[]const u8 {
3838 const is_simulator_abi = target.abi == .simulator;
3939 const sdk = switch (target.os.tag) {
40 .ios => switch (target.abi) {
41 .macabi => "macosx",
42 .simulator => "iphonesimulator",
43 else => "iphoneos",
44 },
4540 .driverkit => "driverkit",
46 .macos => "macosx",
41 .ios => if (is_simulator_abi) "iphonesimulator" else "iphoneos",
42 .maccatalyst, .macos => "macosx",
4743 .tvos => if (is_simulator_abi) "appletvsimulator" else "appletvos",
4844 .visionos => if (is_simulator_abi) "xrsimulator" else "xros",
4945 .watchos => if (is_simulator_abi) "watchsimulator" else "watchos",
src/Compilation.zig+5-2
......@@ -6761,12 +6761,15 @@ fn addCommonCCArgs(
67616761 }
67626762
67636763 switch (target.os.tag) {
6764 .ios, .macos, .tvos, .watchos => |os| if (is_clang) {
6764 .ios, .maccatalyst, .macos, .tvos, .watchos => |os| if (is_clang) {
67656765 try argv.ensureUnusedCapacity(2);
67666766 // Pass the proper -m<os>-version-min argument for darwin.
67676767 const ver = target.os.version_range.semver.min;
67686768 argv.appendAssumeCapacity(try std.fmt.allocPrint(arena, "-m{s}{s}-version-min={d}.{d}.{d}", .{
6769 @tagName(os),
6769 switch (os) {
6770 .maccatalyst => "ios",
6771 else => @tagName(os),
6772 },
67706773 switch (target.abi) {
67716774 .simulator => "-simulator",
67726775 else => "",
src/Compilation/Config.zig+1-1
......@@ -369,7 +369,7 @@ pub fn resolve(options: Options) ResolveError!Config {
369369
370370 // load_dynamic_library standalone test not passing on this combination
371371 // https://github.com/ziglang/zig/issues/24080
372 if (target.os.tag == .macos and is_dyn_lib) break :b true;
372 if (target.os.tag.isDarwin() and is_dyn_lib) break :b true;
373373
374374 // At this point we would prefer to use our own self-hosted backend,
375375 // because the compilation speed is better than LLVM. But only do it if
src/Zcu/PerThread.zig+1-1
......@@ -189,7 +189,7 @@ pub fn updateFile(
189189 // disambiguates by returning EEXIST, indicating original
190190 // failure was a race, or ENOENT, indicating deletion of the
191191 // directory of our open handle.
192 if (builtin.os.tag != .macos) {
192 if (!builtin.os.tag.isDarwin()) {
193193 std.process.fatal("cache directory '{f}' unexpectedly removed during compiler execution", .{
194194 cache_directory,
195195 });
src/codegen/llvm.zig+10-9
......@@ -183,6 +183,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
183183 try llvm_triple.appendSlice(switch (target.os.tag) {
184184 .driverkit,
185185 .ios,
186 .maccatalyst,
186187 .macos,
187188 .tvos,
188189 .visionos,
......@@ -204,7 +205,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
204205 try llvm_triple.append('-');
205206
206207 const llvm_os = switch (target.os.tag) {
207 .freestanding => "unknown",
208208 .dragonfly => "dragonfly",
209209 .freebsd => "freebsd",
210210 .fuchsia => "fuchsia",
......@@ -218,11 +218,9 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
218218 .cuda => "cuda",
219219 .nvcl => "nvcl",
220220 .amdhsa => "amdhsa",
221 .opencl => "unknown", // https://llvm.org/docs/SPIRVUsage.html#target-triples
222221 .ps3 => "lv2",
223222 .ps4 => "ps4",
224223 .ps5 => "ps5",
225 .vita => "unknown", // LLVM doesn't know about this target
226224 .mesa3d => "mesa3d",
227225 .amdpal => "amdpal",
228226 .hermit => "hermit",
......@@ -230,7 +228,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
230228 .wasi => "wasi",
231229 .emscripten => "emscripten",
232230 .macos => "macosx",
233 .ios => "ios",
231 .ios, .maccatalyst => "ios",
234232 .tvos => "tvos",
235233 .watchos => "watchos",
236234 .driverkit => "driverkit",
......@@ -240,10 +238,13 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
240238 .managarm => "managarm",
241239
242240 .@"3ds",
243 .opengl,
244 .plan9,
245241 .contiki,
242 .freestanding,
243 .opencl, // https://llvm.org/docs/SPIRVUsage.html#target-triples
244 .opengl,
246245 .other,
246 .plan9,
247 .vita,
247248 => "unknown",
248249 };
249250 try llvm_triple.appendSlice(llvm_os);
......@@ -266,7 +267,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
266267 try llvm_triple.append('-');
267268
268269 const llvm_abi = switch (target.abi) {
269 .none, .ilp32 => "unknown",
270 .none => if (target.os.tag == .maccatalyst) "macabi" else "unknown",
270271 .gnu => "gnu",
271272 .gnuabin32 => "gnuabin32",
272273 .gnuabi64 => "gnuabi64",
......@@ -275,6 +276,7 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
275276 .gnuf32 => "gnuf32",
276277 .gnusf => "gnusf",
277278 .gnux32 => "gnux32",
279 .ilp32 => "unknown",
278280 .code16 => "code16",
279281 .eabi => "eabi",
280282 .eabihf => "eabihf",
......@@ -296,7 +298,6 @@ pub fn targetTriple(allocator: Allocator, target: *const std.Target) ![]const u8
296298 .msvc => "msvc",
297299 .itanium => "itanium",
298300 .simulator => "simulator",
299 .macabi => "macabi",
300301 .ohos, .ohoseabi => "ohos",
301302 };
302303 try llvm_triple.appendSlice(llvm_abi);
......@@ -12595,7 +12596,7 @@ fn ccAbiPromoteInt(cc: std.builtin.CallingConvention, zcu: *Zcu, ty: Type) ?std.
1259512596 else => return null,
1259612597 };
1259712598 return switch (target.os.tag) {
12598 .macos, .ios, .watchos, .tvos, .visionos => switch (int_info.bits) {
12599 .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => switch (int_info.bits) {
1259912600 0...16 => int_info.signedness,
1260012601 else => null,
1260112602 },
src/libs/libtsan.zig+2-2
......@@ -30,7 +30,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
3030 const root_name = switch (target.os.tag) {
3131 // On Apple platforms, we use the same name as LLVM because the
3232 // TSAN library implementation hard-codes a check for these names.
33 .driverkit, .macos => "clang_rt.tsan_osx_dynamic",
33 .driverkit, .maccatalyst, .macos => "clang_rt.tsan_osx_dynamic",
3434 .ios => if (target.abi == .simulator) "clang_rt.tsan_iossim_dynamic" else "clang_rt.tsan_ios_dynamic",
3535 .tvos => if (target.abi == .simulator) "clang_rt.tsan_tvossim_dynamic" else "clang_rt.tsan_tvos_dynamic",
3636 .visionos => if (target.abi == .simulator) "clang_rt.tsan_xrossim_dynamic" else "clang_rt.tsan_xros_dynamic",
......@@ -134,7 +134,7 @@ pub fn buildTsan(comp: *Compilation, prog_node: std.Progress.Node) BuildError!vo
134134 }
135135
136136 const platform_tsan_sources = switch (target.os.tag) {
137 .ios, .macos, .watchos, .tvos, .visionos => &darwin_tsan_sources,
137 .driverkit, .ios, .maccatalyst, .macos, .watchos, .tvos, .visionos => &darwin_tsan_sources,
138138 .windows => &windows_tsan_sources,
139139 else => &unix_tsan_sources,
140140 };
src/link.zig+2-2
......@@ -620,7 +620,7 @@ pub const File = struct {
620620 .linux => std.posix.ptrace(std.os.linux.PTRACE.ATTACH, pid, 0, 0) catch |err| {
621621 log.warn("ptrace failure: {s}", .{@errorName(err)});
622622 },
623 .macos => {
623 .maccatalyst, .macos => {
624624 const macho_file = base.cast(.macho).?;
625625 macho_file.ptraceAttach(pid) catch |err| {
626626 log.warn("attaching failed with error: {s}", .{@errorName(err)});
......@@ -700,7 +700,7 @@ pub const File = struct {
700700
701701 if (base.child_pid) |pid| {
702702 switch (builtin.os.tag) {
703 .macos => {
703 .maccatalyst, .macos => {
704704 const macho_file = base.cast(.macho).?;
705705 macho_file.ptraceDetach(pid) catch |err| {
706706 log.warn("detaching failed with error: {s}", .{@errorName(err)});
src/link/MachO.zig+17-20
......@@ -3596,7 +3596,7 @@ pub fn requiresCodeSig(self: MachO) bool {
35963596 const target = self.getTarget();
35973597 return switch (target.cpu.arch) {
35983598 .aarch64 => switch (target.os.tag) {
3599 .driverkit, .macos => true,
3599 .driverkit, .maccatalyst, .macos => true,
36003600 .ios, .tvos, .visionos, .watchos => target.abi == .simulator,
36013601 else => false,
36023602 },
......@@ -4032,7 +4032,7 @@ fn formatSectType(tt: u8, w: *Writer) Writer.Error!void {
40324032}
40334033
40344034const is_hot_update_compatible = switch (builtin.target.os.tag) {
4035 .macos => true,
4035 .maccatalyst, .macos => true,
40364036 else => false,
40374037};
40384038
......@@ -4174,7 +4174,7 @@ pub const Platform = struct {
41744174 .os_tag = switch (cmd.platform) {
41754175 .DRIVERKIT => .driverkit,
41764176 .IOS, .IOSSIMULATOR => .ios,
4177 .MACCATALYST => .ios,
4177 .MACCATALYST => .maccatalyst,
41784178 .MACOS => .macos,
41794179 .TVOS, .TVOSSIMULATOR => .tvos,
41804180 .VISIONOS, .VISIONOSSIMULATOR => .visionos,
......@@ -4182,7 +4182,6 @@ pub const Platform = struct {
41824182 else => @panic("TODO"),
41834183 },
41844184 .abi = switch (cmd.platform) {
4185 .MACCATALYST => .macabi,
41864185 .IOSSIMULATOR,
41874186 .TVOSSIMULATOR,
41884187 .VISIONOSSIMULATOR,
......@@ -4198,6 +4197,7 @@ pub const Platform = struct {
41984197 .VERSION_MIN_TVOS,
41994198 .VERSION_MIN_WATCHOS,
42004199 => {
4200 // We can't distinguish Mac Catalyst here, but this is legacy stuff anyway.
42014201 const cmd = lc.cast(macho.version_min_command).?;
42024202 return .{
42034203 .os_tag = switch (lc.cmd()) {
......@@ -4230,11 +4230,8 @@ pub const Platform = struct {
42304230 pub fn toApplePlatform(plat: Platform) macho.PLATFORM {
42314231 return switch (plat.os_tag) {
42324232 .driverkit => .DRIVERKIT,
4233 .ios => switch (plat.abi) {
4234 .macabi => .MACCATALYST,
4235 .simulator => .IOSSIMULATOR,
4236 else => .IOS,
4237 },
4233 .ios => if (plat.abi == .simulator) .IOSSIMULATOR else .IOS,
4234 .maccatalyst => .MACCATALYST,
42384235 .macos => .MACOS,
42394236 .tvos => if (plat.abi == .simulator) .TVOSSIMULATOR else .TVOS,
42404237 .visionos => if (plat.abi == .simulator) .VISIONOSSIMULATOR else .VISIONOS,
......@@ -4300,17 +4297,17 @@ const SupportedPlatforms = struct {
43004297// Source: https://github.com/apple-oss-distributions/ld64/blob/59a99ab60399c5e6c49e6945a9e1049c42b71135/src/ld/PlatformSupport.cpp#L52
43014298// zig fmt: off
43024299const supported_platforms = [_]SupportedPlatforms{
4303 .{ .driverkit, .none, 0x130000, 0x130000 },
4304 .{ .ios, .none, 0x0C0000, 0x070000 },
4305 .{ .ios, .macabi, 0x0D0000, 0x0D0000 },
4306 .{ .ios, .simulator, 0x0D0000, 0x080000 },
4307 .{ .macos, .none, 0x0A0E00, 0x0A0800 },
4308 .{ .tvos, .none, 0x0C0000, 0x070000 },
4309 .{ .tvos, .simulator, 0x0D0000, 0x080000 },
4310 .{ .visionos, .none, 0x010000, 0x010000 },
4311 .{ .visionos, .simulator, 0x010000, 0x010000 },
4312 .{ .watchos, .none, 0x050000, 0x020000 },
4313 .{ .watchos, .simulator, 0x060000, 0x020000 },
4300 .{ .driverkit, .none, 0x130000, 0x130000 },
4301 .{ .ios, .none, 0x0C0000, 0x070000 },
4302 .{ .ios, .simulator, 0x0D0000, 0x080000 },
4303 .{ .maccatalyst, .none, 0x0D0000, 0x0D0000 },
4304 .{ .macos, .none, 0x0A0E00, 0x0A0800 },
4305 .{ .tvos, .none, 0x0C0000, 0x070000 },
4306 .{ .tvos, .simulator, 0x0D0000, 0x080000 },
4307 .{ .visionos, .none, 0x010000, 0x010000 },
4308 .{ .visionos, .simulator, 0x010000, 0x010000 },
4309 .{ .watchos, .none, 0x050000, 0x020000 },
4310 .{ .watchos, .simulator, 0x060000, 0x020000 },
43144311};
43154312// zig fmt: on
43164313
src/link/MachO/load_commands.zig+1-1
......@@ -281,7 +281,7 @@ pub fn writeRpathLC(rpath: []const u8, writer: *Writer) !void {
281281pub fn writeVersionMinLC(platform: MachO.Platform, sdk_version: ?std.SemanticVersion, writer: *Writer) !void {
282282 const cmd: macho.LC = switch (platform.os_tag) {
283283 .macos => .VERSION_MIN_MACOSX,
284 .ios => .VERSION_MIN_IPHONEOS,
284 .ios, .maccatalyst => .VERSION_MIN_IPHONEOS,
285285 .tvos => .VERSION_MIN_TVOS,
286286 .watchos => .VERSION_MIN_WATCHOS,
287287 else => unreachable,
src/main.zig+1-1
......@@ -4487,7 +4487,7 @@ fn runOrTestHotSwap(
44874487 }
44884488
44894489 switch (builtin.target.os.tag) {
4490 .macos, .ios, .tvos, .watchos, .visionos => {
4490 .macos => {
44914491 const PosixSpawn = @import("DarwinPosixSpawn.zig");
44924492
44934493 var attr = try PosixSpawn.Attr.init();
src/target.zig+1
......@@ -29,6 +29,7 @@ pub fn libCNeedsLibUnwind(target: *const std.Target, link_mode: std.builtin.Link
2929
3030pub fn libCxxNeedsLibUnwind(target: *const std.Target) bool {
3131 return switch (target.os.tag) {
32 .maccatalyst,
3233 .macos,
3334 .ios,
3435 .watchos,
test/behavior/basic.zig+1-1
......@@ -1398,7 +1398,7 @@ test "allocation and looping over 3-byte integer" {
13981398 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
13991399 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
14001400
1401 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag == .macos) {
1401 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag.isDarwin()) {
14021402 return error.SkipZigTest; // TODO
14031403 }
14041404 if (builtin.cpu.arch == .s390x and builtin.zig_backend == .stage2_llvm) return error.SkipZigTest; // TODO
test/behavior/threadlocal.zig+1-1
......@@ -9,7 +9,7 @@ test "thread local variable" {
99 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
1010 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; // TODO
1111
12 if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag == .macos) {
12 if (builtin.zig_backend == .stage2_x86_64 and builtin.os.tag.isDarwin()) {
1313 // Fails due to register hazards.
1414 return error.SkipZigTest;
1515 }
test/behavior/var_args.zig+5-5
......@@ -97,7 +97,7 @@ test "simple variadic function" {
9797 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
9898 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
9999 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
100 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {
100 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
101101 // https://github.com/ziglang/zig/issues/14096
102102 return error.SkipZigTest;
103103 }
......@@ -159,7 +159,7 @@ test "coerce reference to var arg" {
159159 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
160160 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
161161 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
162 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {
162 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
163163 // https://github.com/ziglang/zig/issues/14096
164164 return error.SkipZigTest;
165165 }
......@@ -191,7 +191,7 @@ test "variadic functions" {
191191 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
192192 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
193193 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
194 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {
194 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
195195 // https://github.com/ziglang/zig/issues/14096
196196 return error.SkipZigTest;
197197 }
......@@ -244,7 +244,7 @@ test "copy VaList" {
244244 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
245245 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
246246 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
247 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {
247 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
248248 // https://github.com/ziglang/zig/issues/14096
249249 return error.SkipZigTest;
250250 }
......@@ -279,7 +279,7 @@ test "unused VaList arg" {
279279 if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
280280 if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest;
281281 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
282 if (builtin.zig_backend == .stage2_llvm and builtin.os.tag != .macos and builtin.cpu.arch.isAARCH64()) {
282 if (builtin.zig_backend == .stage2_llvm and !builtin.os.tag.isDarwin() and builtin.cpu.arch.isAARCH64()) {
283283 // https://github.com/ziglang/zig/issues/14096
284284 return error.SkipZigTest;
285285 }
test/c_abi/main.zig+1-1
......@@ -1157,7 +1157,7 @@ test "big simd vector" {
11571157 if (builtin.cpu.arch.isMIPS64() and builtin.mode != .Debug) return error.SkipZigTest;
11581158 if (builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest;
11591159 if (builtin.cpu.arch.isLoongArch()) return error.SkipZigTest;
1160 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .x86_64 and builtin.os.tag == .macos and builtin.mode != .Debug) return error.SkipZigTest;
1160 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .x86_64 and builtin.os.tag.isDarwin() and builtin.mode != .Debug) return error.SkipZigTest;
11611161
11621162 c_big_vec(.{ 1, 2, 3, 4, 5, 6, 7, 8 });
11631163
test/llvm_targets.zig+2-1
......@@ -9,7 +9,6 @@ const targets = [_]std.Target.Query{
99 .{ .cpu_arch = .aarch64, .os_tag = .haiku, .abi = .none },
1010 .{ .cpu_arch = .aarch64, .os_tag = .hermit, .abi = .none },
1111 .{ .cpu_arch = .aarch64, .os_tag = .hurd, .abi = .gnu },
12 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .macabi },
1312 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .none },
1413 .{ .cpu_arch = .aarch64, .os_tag = .ios, .abi = .simulator },
1514 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .android },
......@@ -17,6 +16,7 @@ const targets = [_]std.Target.Query{
1716 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .musl },
1817 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .none },
1918 .{ .cpu_arch = .aarch64, .os_tag = .linux, .abi = .ohos },
19 .{ .cpu_arch = .aarch64, .os_tag = .maccatalyst, .abi = .none },
2020 .{ .cpu_arch = .aarch64, .os_tag = .macos, .abi = .none },
2121 .{ .cpu_arch = .aarch64, .os_tag = .netbsd, .abi = .none },
2222 .{ .cpu_arch = .aarch64, .os_tag = .openbsd, .abi = .none },
......@@ -326,6 +326,7 @@ const targets = [_]std.Target.Query{
326326 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .muslx32 },
327327 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .none },
328328 .{ .cpu_arch = .x86_64, .os_tag = .linux, .abi = .ohos },
329 .{ .cpu_arch = .x86_64, .os_tag = .maccatalyst, .abi = .none },
329330 .{ .cpu_arch = .x86_64, .os_tag = .macos, .abi = .none },
330331 .{ .cpu_arch = .x86_64, .os_tag = .netbsd, .abi = .none },
331332 .{ .cpu_arch = .x86_64, .os_tag = .openbsd, .abi = .none },