authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-06-23 17:38:28+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-20 05:08:14+02:00
log5a2f6acb447abef01088c0030ca41a5e0e036114
tree0892ba51f9e87127cab43e976fa5243b000add00
parent9939b116bf472ceb93192608393f3bfc14cde6df
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: Remove `kfreebsd` OS specifier.

kFreeBSD is dead. https://lists.debian.org/debian-devel/2023/07/msg00176.html

5 files changed, 87 insertions(+), 98 deletions(-)

lib/compiler/aro/aro/target.zig-1
......@@ -674,7 +674,6 @@ pub fn toLLVMTriple(target: std.Target, buf: []u8) []const u8 {
674674 .dragonfly => "dragonfly",
675675 .freebsd => "freebsd",
676676 .fuchsia => "fuchsia",
677 .kfreebsd => "kfreebsd",
678677 .linux => "linux",
679678 .lv2 => "lv2",
680679 .netbsd => "netbsd",
lib/std/Target.zig+1-8
......@@ -23,7 +23,6 @@ pub const Os = struct {
2323 freebsd,
2424 fuchsia,
2525 ios,
26 kfreebsd,
2726 linux,
2827 lv2,
2928 macos,
......@@ -74,7 +73,7 @@ pub const Os = struct {
7473
7574 pub inline fn isBSD(tag: Tag) bool {
7675 return tag.isDarwin() or switch (tag) {
77 .kfreebsd, .freebsd, .openbsd, .netbsd, .dragonfly => true,
76 .freebsd, .openbsd, .netbsd, .dragonfly => true,
7877 else => false,
7978 };
8079 }
......@@ -140,7 +139,6 @@ pub const Os = struct {
140139 .ananas,
141140 .cloudabi,
142141 .fuchsia,
143 .kfreebsd,
144142 .lv2,
145143 .zos,
146144 .haiku,
......@@ -374,7 +372,6 @@ pub const Os = struct {
374372 .ananas,
375373 .cloudabi,
376374 .fuchsia,
377 .kfreebsd,
378375 .lv2,
379376 .zos,
380377 .haiku,
......@@ -563,7 +560,6 @@ pub const Os = struct {
563560 .ananas,
564561 .cloudabi,
565562 .fuchsia,
566 .kfreebsd,
567563 .lv2,
568564 .zos,
569565 .minix,
......@@ -689,7 +685,6 @@ pub const Abi = enum {
689685 .openbsd,
690686 .freebsd,
691687 .fuchsia,
692 .kfreebsd,
693688 .netbsd,
694689 .hurd,
695690 .haiku,
......@@ -1855,7 +1850,6 @@ pub const DynamicLinker = struct {
18551850 .ananas,
18561851 .cloudabi,
18571852 .fuchsia,
1858 .kfreebsd,
18591853 .lv2,
18601854 .zos,
18611855 .minix,
......@@ -2375,7 +2369,6 @@ pub fn c_type_bit_size(target: Target, c_type: CType) u16 {
23752369 },
23762370
23772371 .cloudabi,
2378 .kfreebsd,
23792372 .lv2,
23802373 .zos,
23812374 .rtems,
lib/std/c.zig+85-86
......@@ -106,7 +106,7 @@ pub const timespec = switch (native_os) {
106106 sec: time_t,
107107 nsec: c_long,
108108 },
109 .dragonfly, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
109 .dragonfly, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
110110 sec: isize,
111111 nsec: isize,
112112 },
......@@ -126,7 +126,7 @@ pub const dev_t = switch (native_os) {
126126 .emscripten => emscripten.dev_t,
127127 .wasi => wasi.device_t,
128128 .openbsd, .haiku, .solaris, .illumos, .macos, .ios, .tvos, .watchos, .visionos => i32,
129 .netbsd, .freebsd, .kfreebsd => u64,
129 .netbsd, .freebsd => u64,
130130 else => void,
131131};
132132
......@@ -134,7 +134,7 @@ pub const mode_t = switch (native_os) {
134134 .linux => linux.mode_t,
135135 .emscripten => emscripten.mode_t,
136136 .openbsd, .haiku, .netbsd, .solaris, .illumos, .wasi => u32,
137 .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u16,
137 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u16,
138138 else => u0,
139139};
140140
......@@ -142,7 +142,7 @@ pub const nlink_t = switch (native_os) {
142142 .linux => linux.nlink_t,
143143 .emscripten => emscripten.nlink_t,
144144 .wasi => c_ulonglong,
145 .freebsd, .kfreebsd => u64,
145 .freebsd => u64,
146146 .openbsd, .netbsd, .solaris, .illumos => u32,
147147 .haiku => i32,
148148 else => void,
......@@ -235,7 +235,7 @@ pub const clockid_t = switch (native_os) {
235235 /// clock measuring the used CPU time of the current thread
236236 THREAD_CPUTIME_ID = -3,
237237 },
238 .freebsd, .kfreebsd => enum(u32) {
238 .freebsd => enum(u32) {
239239 REALTIME = 0,
240240 VIRTUAL = 1,
241241 PROF = 2,
......@@ -389,7 +389,7 @@ pub const E = switch (native_os) {
389389 _,
390390 },
391391 .macos, .ios, .tvos, .watchos, .visionos => darwin.E,
392 .freebsd, .kfreebsd => freebsd.E,
392 .freebsd => freebsd.E,
393393 .solaris, .illumos => enum(u16) {
394394 /// No error occurred.
395395 SUCCESS = 0,
......@@ -781,7 +781,7 @@ pub const F = switch (native_os) {
781781 /// exclusive or write lock
782782 pub const WRLCK = 3;
783783 },
784 .freebsd, .kfreebsd => struct {
784 .freebsd => struct {
785785 /// Duplicate file descriptor.
786786 pub const DUPFD = 0;
787787 /// Get file descriptor flags.
......@@ -1075,7 +1075,7 @@ pub const Flock = switch (native_os) {
10751075 type: i16,
10761076 whence: i16,
10771077 },
1078 .freebsd, .kfreebsd => extern struct {
1078 .freebsd => extern struct {
10791079 /// Starting offset.
10801080 start: off_t,
10811081 /// Number of consecutive bytes to be locked.
......@@ -1112,7 +1112,7 @@ pub const Flock = switch (native_os) {
11121112pub const HOST_NAME_MAX = switch (native_os) {
11131113 .linux => linux.HOST_NAME_MAX,
11141114 .macos, .ios, .tvos, .watchos, .visionos => 72,
1115 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => 255,
1115 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd => 255,
11161116 else => {},
11171117};
11181118pub const IOV_MAX = switch (native_os) {
......@@ -1120,11 +1120,11 @@ pub const IOV_MAX = switch (native_os) {
11201120 .emscripten => emscripten.IOV_MAX,
11211121 .openbsd, .haiku, .solaris, .illumos, .wasi => 1024,
11221122 .macos, .ios, .tvos, .watchos, .visionos => 16,
1123 .dragonfly, .netbsd, .freebsd, .kfreebsd => KERN.IOV_MAX,
1123 .dragonfly, .netbsd, .freebsd => KERN.IOV_MAX,
11241124 else => {},
11251125};
11261126pub const CTL = switch (native_os) {
1127 .freebsd, .kfreebsd => struct {
1127 .freebsd => struct {
11281128 pub const KERN = 1;
11291129 pub const DEBUG = 5;
11301130 },
......@@ -1162,7 +1162,7 @@ pub const CTL = switch (native_os) {
11621162 else => void,
11631163};
11641164pub const KERN = switch (native_os) {
1165 .freebsd, .kfreebsd => struct {
1165 .freebsd => struct {
11661166 /// struct: process entries
11671167 pub const PROC = 14;
11681168 /// path to executable
......@@ -1338,7 +1338,7 @@ pub const KERN = switch (native_os) {
13381338pub const MADV = switch (native_os) {
13391339 .linux => linux.MADV,
13401340 .emscripten => emscripten.MADV,
1341 .freebsd, .kfreebsd => struct {
1341 .freebsd => struct {
13421342 pub const NORMAL = 0;
13431343 pub const RANDOM = 1;
13441344 pub const SEQUENTIAL = 2;
......@@ -1403,7 +1403,7 @@ pub const MSF = switch (native_os) {
14031403 pub const DEACTIVATE = 0x8;
14041404 pub const SYNC = 0x10;
14051405 },
1406 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => struct {
1406 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd => struct {
14071407 pub const ASYNC = 1;
14081408 pub const INVALIDATE = 2;
14091409 pub const SYNC = 4;
......@@ -1420,7 +1420,7 @@ pub const NAME_MAX = switch (native_os) {
14201420 // Haiku's headers make this 256, to contain room for the terminating null
14211421 // character, but POSIX definition says that NAME_MAX does not include the
14221422 // terminating null.
1423 .haiku, .openbsd, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 255,
1423 .haiku, .openbsd, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 255,
14241424 else => {},
14251425};
14261426pub const PATH_MAX = switch (native_os) {
......@@ -1428,7 +1428,7 @@ pub const PATH_MAX = switch (native_os) {
14281428 .emscripten => emscripten.PATH_MAX,
14291429 .wasi => 4096,
14301430 .windows => 260,
1431 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 1024,
1431 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 1024,
14321432 else => {},
14331433};
14341434
......@@ -1465,7 +1465,7 @@ pub const POLL = switch (native_os) {
14651465
14661466 pub const STANDARD = IN | PRI | OUT | RDNORM | RDBAND | WRBAND | ERR | HUP | NVAL;
14671467 },
1468 .freebsd, .kfreebsd => struct {
1468 .freebsd => struct {
14691469 /// any readable data available.
14701470 pub const IN = 0x0001;
14711471 /// OOB/Urgent readable data.
......@@ -1568,7 +1568,7 @@ pub const POLL = switch (native_os) {
15681568pub const PROT = switch (native_os) {
15691569 .linux => linux.PROT,
15701570 .emscripten => emscripten.PROT,
1571 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd, .windows => struct {
1571 .openbsd, .haiku, .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .windows => struct {
15721572 /// page can not be accessed
15731573 pub const NONE = 0x0;
15741574 /// page can be read
......@@ -1600,7 +1600,7 @@ pub const PROT = switch (native_os) {
16001600pub const REG = switch (native_os) {
16011601 .linux => linux.REG,
16021602 .emscripten => emscripten.REG,
1603 .freebsd, .kfreebsd => switch (builtin.cpu.arch) {
1603 .freebsd => switch (builtin.cpu.arch) {
16041604 .aarch64 => struct {
16051605 pub const FP = 29;
16061606 pub const SP = 31;
......@@ -1683,7 +1683,7 @@ pub const REG = switch (native_os) {
16831683pub const RLIM = switch (native_os) {
16841684 .linux => linux.RLIM,
16851685 .emscripten => emscripten.RLIM,
1686 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
1686 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
16871687 /// No limit
16881688 pub const INFINITY: rlim_t = (1 << 63) - 1;
16891689
......@@ -1774,7 +1774,7 @@ pub const S = switch (native_os) {
17741774 return m & IFMT == IFWHT;
17751775 }
17761776 },
1777 .freebsd, .kfreebsd => struct {
1777 .freebsd => struct {
17781778 pub const IFMT = 0o170000;
17791779
17801780 pub const IFIFO = 0o010000;
......@@ -2137,7 +2137,7 @@ pub const SA = switch (native_os) {
21372137 /// signal handler with SIGINFO args with 64bit regs information
21382138 pub const @"64REGSET" = 0x0200;
21392139 },
2140 .freebsd, .kfreebsd => struct {
2140 .freebsd => struct {
21412141 pub const ONSTACK = 0x0001;
21422142 pub const RESTART = 0x0002;
21432143 pub const RESETHAND = 0x0004;
......@@ -2214,7 +2214,7 @@ pub const SEEK = switch (native_os) {
22142214 pub const CUR: wasi.whence_t = .CUR;
22152215 pub const END: wasi.whence_t = .END;
22162216 },
2217 .openbsd, .haiku, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows => struct {
2217 .openbsd, .haiku, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos, .windows => struct {
22182218 pub const SET = 0;
22192219 pub const CUR = 1;
22202220 pub const END = 2;
......@@ -2353,7 +2353,7 @@ pub const SIG = switch (native_os) {
23532353 /// user defined signal 2
23542354 pub const USR2 = 31;
23552355 },
2356 .freebsd, .kfreebsd => struct {
2356 .freebsd => struct {
23572357 pub const HUP = 1;
23582358 pub const INT = 2;
23592359 pub const QUIT = 3;
......@@ -2735,7 +2735,7 @@ pub const Sigaction = switch (native_os) {
27352735 mask: sigset_t,
27362736 flags: c_uint,
27372737 },
2738 .dragonfly, .freebsd, .kfreebsd => extern struct {
2738 .dragonfly, .freebsd => extern struct {
27392739 pub const handler_fn = *align(1) const fn (i32) callconv(.C) void;
27402740 pub const sigaction_fn = *const fn (i32, *const siginfo_t, ?*anyopaque) callconv(.C) void;
27412741
......@@ -2807,7 +2807,7 @@ pub const T = switch (native_os) {
28072807 return (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num));
28082808 }
28092809 },
2810 .freebsd, .kfreebsd => struct {
2810 .freebsd => struct {
28112811 pub const IOCEXCL = 0x2000740d;
28122812 pub const IOCNXCL = 0x2000740e;
28132813 pub const IOCSCTTY = 0x20007461;
......@@ -3154,7 +3154,7 @@ pub const W = switch (native_os) {
31543154 }
31553155 const stopped = 0o177;
31563156 },
3157 .freebsd, .kfreebsd => struct {
3157 .freebsd => struct {
31583158 pub const NOHANG = 1;
31593159 pub const UNTRACED = 2;
31603160 pub const STOPPED = UNTRACED;
......@@ -3346,7 +3346,7 @@ pub const clock_t = switch (native_os) {
33463346 .linux => linux.clock_t,
33473347 .emscripten => emscripten.clock_t,
33483348 .macos, .ios, .tvos, .watchos, .visionos => c_ulong,
3349 .freebsd, .kfreebsd => isize,
3349 .freebsd => isize,
33503350 .openbsd, .solaris, .illumos => i64,
33513351 .netbsd => u32,
33523352 .haiku => i32,
......@@ -3360,7 +3360,7 @@ pub const cpu_set_t = switch (native_os) {
33603360pub const dl_phdr_info = switch (native_os) {
33613361 .linux => linux.dl_phdr_info,
33623362 .emscripten => emscripten.dl_phdr_info,
3363 .freebsd, .kfreebsd => extern struct {
3363 .freebsd => extern struct {
33643364 /// Module relocation base.
33653365 addr: if (builtin.target.ptrBitWidth() == 32) std.elf.Elf32_Addr else std.elf.Elf64_Addr,
33663366 /// Module name.
......@@ -3414,7 +3414,7 @@ pub const itimerspec = switch (native_os) {
34143414};
34153415pub const msghdr = switch (native_os) {
34163416 .linux => linux.msghdr,
3417 .openbsd, .emscripten, .dragonfly, .freebsd, .kfreebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
3417 .openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
34183418 /// optional address
34193419 name: ?*sockaddr,
34203420 /// size of address
......@@ -3434,7 +3434,7 @@ pub const msghdr = switch (native_os) {
34343434};
34353435pub const msghdr_const = switch (native_os) {
34363436 .linux => linux.msghdr_const,
3437 .openbsd, .emscripten, .dragonfly, .freebsd, .kfreebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
3437 .openbsd, .emscripten, .dragonfly, .freebsd, .netbsd, .haiku, .solaris, .illumos => extern struct {
34383438 /// optional address
34393439 name: ?*const sockaddr,
34403440 /// size of address
......@@ -3457,7 +3457,7 @@ pub const nfds_t = switch (native_os) {
34573457 .emscripten => emscripten.nfds_t,
34583458 .haiku, .solaris, .illumos, .wasi => usize,
34593459 .windows => c_ulong,
3460 .openbsd, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u32,
3460 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u32,
34613461 else => void,
34623462};
34633463pub const perf_event_attr = switch (native_os) {
......@@ -3484,7 +3484,7 @@ pub const rlim_t = switch (native_os) {
34843484 .linux => linux.rlim_t,
34853485 .emscripten => emscripten.rlim_t,
34863486 .openbsd, .netbsd, .solaris, .illumos, .macos, .ios, .tvos, .watchos, .visionos => u64,
3487 .haiku, .dragonfly, .freebsd, .kfreebsd => i64,
3487 .haiku, .dragonfly, .freebsd => i64,
34883488 else => void,
34893489};
34903490pub const rlimit = switch (native_os) {
......@@ -3514,7 +3514,7 @@ pub const rlimit_resource = switch (native_os) {
35143514
35153515 pub const AS: rlimit_resource = .RSS;
35163516 },
3517 .freebsd, .kfreebsd => enum(c_int) {
3517 .freebsd => enum(c_int) {
35183518 CPU = 0,
35193519 FSIZE = 1,
35203520 DATA = 2,
......@@ -3660,7 +3660,7 @@ pub const siginfo_t = switch (native_os) {
36603660 si_band: c_long,
36613661 _pad: [7]c_ulong,
36623662 },
3663 .freebsd, .kfreebsd => extern struct {
3663 .freebsd => extern struct {
36643664 // Signal number.
36653665 signo: c_int,
36663666 // Errno association.
......@@ -3822,7 +3822,7 @@ pub const sigset_t = switch (native_os) {
38223822 .linux => linux.sigset_t,
38233823 .emscripten => emscripten.sigset_t,
38243824 .openbsd, .macos, .ios, .tvos, .watchos, .visionos => u32,
3825 .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => extern struct {
3825 .dragonfly, .netbsd, .solaris, .illumos, .freebsd => extern struct {
38263826 __bits: [SIG.WORDS]u32,
38273827 },
38283828 .haiku => u64,
......@@ -3831,7 +3831,7 @@ pub const sigset_t = switch (native_os) {
38313831pub const empty_sigset: sigset_t = switch (native_os) {
38323832 .linux => linux.empty_sigset,
38333833 .emscripten => emscripten.empty_sigset,
3834 .dragonfly, .netbsd, .solaris, .illumos, .freebsd, .kfreebsd => .{ .__bits = [_]u32{0} ** SIG.WORDS },
3834 .dragonfly, .netbsd, .solaris, .illumos, .freebsd => .{ .__bits = [_]u32{0} ** SIG.WORDS },
38353835 else => 0,
38363836};
38373837pub const filled_sigset = switch (native_os) {
......@@ -3841,7 +3841,7 @@ pub const filled_sigset = switch (native_os) {
38413841};
38423842pub const sigval = switch (native_os) {
38433843 .linux => linux.sigval,
3844 .openbsd, .dragonfly, .freebsd, .kfreebsd => extern union {
3844 .openbsd, .dragonfly, .freebsd => extern union {
38453845 int: c_int,
38463846 ptr: ?*anyopaque,
38473847 },
......@@ -3851,7 +3851,7 @@ pub const sigval = switch (native_os) {
38513851pub const addrinfo = switch (native_os) {
38523852 .linux, .emscripten => linux.addrinfo,
38533853 .windows => ws2_32.addrinfo,
3854 .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
3854 .freebsd, .macos, .ios, .tvos, .watchos, .visionos => extern struct {
38553855 flags: AI,
38563856 family: i32,
38573857 socktype: i32,
......@@ -3955,7 +3955,7 @@ pub const sockaddr = switch (native_os) {
39553955 path: [104]u8,
39563956 };
39573957 },
3958 .freebsd, .kfreebsd => extern struct {
3958 .freebsd => extern struct {
39593959 /// total length
39603960 len: u8,
39613961 /// address family
......@@ -4228,7 +4228,7 @@ pub const in_port_t = u16;
42284228pub const sa_family_t = switch (native_os) {
42294229 .linux, .emscripten => linux.sa_family_t,
42304230 .windows => ws2_32.ADDRESS_FAMILY,
4231 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => u8,
4231 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => u8,
42324232 .solaris, .illumos => u16,
42334233 else => void,
42344234};
......@@ -4275,7 +4275,7 @@ pub const AF = switch (native_os) {
42754275 pub const PPP = 34;
42764276 pub const MAX = 40;
42774277 },
4278 .freebsd, .kfreebsd => struct {
4278 .freebsd => struct {
42794279 pub const UNSPEC = 0;
42804280 pub const UNIX = 1;
42814281 pub const LOCAL = UNIX;
......@@ -4505,7 +4505,7 @@ pub const PF = switch (native_os) {
45054505 pub const PPP = AF.PPP;
45064506 pub const MAX = AF.MAX;
45074507 },
4508 .freebsd, .kfreebsd => struct {
4508 .freebsd => struct {
45094509 pub const UNSPEC = AF.UNSPEC;
45104510 pub const LOCAL = AF.LOCAL;
45114511 pub const UNIX = PF.LOCAL;
......@@ -4691,7 +4691,7 @@ pub const PF = switch (native_os) {
46914691};
46924692pub const DT = switch (native_os) {
46934693 .linux => linux.DT,
4694 .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
4694 .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
46954695 pub const UNKNOWN = 0;
46964696 pub const FIFO = 1;
46974697 pub const CHR = 2;
......@@ -4768,7 +4768,7 @@ pub const SOCK = switch (native_os) {
47684768 /// with any other `SOCK` bits.
47694769 pub const NONBLOCK = 1 << 16;
47704770 },
4771 .freebsd, .kfreebsd => struct {
4771 .freebsd => struct {
47724772 pub const STREAM = 1;
47734773 pub const DGRAM = 2;
47744774 pub const RAW = 3;
......@@ -4854,7 +4854,7 @@ pub const IPPROTO = switch (native_os) {
48544854 pub const IP = 0;
48554855 pub const IPV6 = 41;
48564856 },
4857 .freebsd, .kfreebsd => struct {
4857 .freebsd => struct {
48584858 /// dummy for IP
48594859 pub const IP = 0;
48604860 /// control message protocol
......@@ -5431,7 +5431,7 @@ pub const SOL = switch (native_os) {
54315431 .linux => linux.SOL,
54325432 .emscripten => emscripten.SOL,
54335433 .windows => ws2_32.SOL,
5434 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
5434 .openbsd, .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => struct {
54355435 pub const SOCKET = 0xffff;
54365436 },
54375437 .solaris, .illumos => struct {
......@@ -5474,7 +5474,7 @@ pub const SO = switch (native_os) {
54745474 pub const NWRITE = 0x1024;
54755475 pub const REUSESHAREUID = 0x1025;
54765476 },
5477 .freebsd, .kfreebsd => struct {
5477 .freebsd => struct {
54785478 pub const DEBUG = 0x00000001;
54795479 pub const ACCEPTCONN = 0x00000002;
54805480 pub const REUSEADDR = 0x00000004;
......@@ -5670,7 +5670,7 @@ pub const IFNAMESIZE = switch (native_os) {
56705670 .linux => linux.IFNAMESIZE,
56715671 .emscripten => emscripten.IFNAMESIZE,
56725672 .windows => 30,
5673 .openbsd, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => 16,
5673 .openbsd, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => 16,
56745674 .solaris, .illumos => 32,
56755675 else => void,
56765676};
......@@ -5678,7 +5678,7 @@ pub const IFNAMESIZE = switch (native_os) {
56785678pub const stack_t = switch (native_os) {
56795679 .linux => linux.stack_t,
56805680 .emscripten => emscripten.stack_t,
5681 .freebsd, .kfreebsd => extern struct {
5681 .freebsd => extern struct {
56825682 /// Signal stack base.
56835683 sp: *anyopaque,
56845684 /// Signal stack length.
......@@ -5700,7 +5700,7 @@ pub const time_t = switch (native_os) {
57005700};
57015701pub const suseconds_t = switch (native_os) {
57025702 .solaris, .illumos => i64,
5703 .freebsd, .kfreebsd, .dragonfly => c_long,
5703 .freebsd, .dragonfly => c_long,
57045704 .netbsd => c_int,
57055705 .haiku => i32,
57065706 else => void,
......@@ -5717,7 +5717,7 @@ pub const timeval = switch (native_os) {
57175717 sec: c_long,
57185718 usec: i32,
57195719 },
5720 .dragonfly, .netbsd, .freebsd, .kfreebsd, .solaris, .illumos => extern struct {
5720 .dragonfly, .netbsd, .freebsd, .solaris, .illumos => extern struct {
57215721 /// seconds
57225722 sec: time_t,
57235723 /// microseconds
......@@ -5751,7 +5751,7 @@ pub const ucontext_t = switch (native_os) {
57515751 mcontext: *mcontext_t,
57525752 __mcontext_data: mcontext_t,
57535753 },
5754 .freebsd, .kfreebsd => extern struct {
5754 .freebsd => extern struct {
57555755 sigmask: sigset_t,
57565756 mcontext: mcontext_t,
57575757 link: ?*ucontext_t,
......@@ -5806,7 +5806,7 @@ pub const mcontext_t = switch (native_os) {
58065806 .linux => linux.mcontext_t,
58075807 .emscripten => emscripten.mcontext_t,
58085808 .macos, .ios, .tvos, .watchos, .visionos => darwin.mcontext_t,
5809 .freebsd, .kfreebsd => switch (builtin.cpu.arch) {
5809 .freebsd => switch (builtin.cpu.arch) {
58105810 .x86_64 => extern struct {
58115811 onstack: u64,
58125812 rdi: u64,
......@@ -5920,7 +5920,7 @@ pub const _errno = switch (native_os) {
59205920 .emscripten => private.__errno_location,
59215921 .wasi, .dragonfly => private.errnoFromThreadLocal,
59225922 .windows => private._errno,
5923 .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .kfreebsd => private.__error,
5923 .macos, .ios, .tvos, .watchos, .visionos, .freebsd => private.__error,
59245924 .solaris, .illumos => private.___errno,
59255925 .openbsd, .netbsd => private.__errno,
59265926 .haiku => haiku._errnop,
......@@ -5938,7 +5938,7 @@ pub const RTLD = switch (native_os) {
59385938 NODELETE: bool = false,
59395939 _: u19 = 0,
59405940 },
5941 .dragonfly, .freebsd, .kfreebsd => packed struct(u32) {
5941 .dragonfly, .freebsd => packed struct(u32) {
59425942 LAZY: bool = false,
59435943 NOW: bool = false,
59445944 _2: u6 = 0,
......@@ -6018,7 +6018,7 @@ pub const dirent = switch (native_os) {
60186018 type: u8,
60196019 name: [1024]u8,
60206020 },
6021 .freebsd, .kfreebsd => extern struct {
6021 .freebsd => extern struct {
60226022 /// File number of entry.
60236023 fileno: ino_t,
60246024 /// Directory offset of entry.
......@@ -6093,7 +6093,7 @@ pub const dirent64 = switch (native_os) {
60936093
60946094pub const AI = switch (native_os) {
60956095 .linux, .emscripten => linux.AI,
6096 .dragonfly, .haiku, .freebsd, .kfreebsd => packed struct(u32) {
6096 .dragonfly, .haiku, .freebsd => packed struct(u32) {
60976097 PASSIVE: bool = false,
60986098 CANONNAME: bool = false,
60996099 NUMERICHOST: bool = false,
......@@ -6194,7 +6194,7 @@ pub const EAI = switch (native_os) {
61946194
61956195 _,
61966196 },
6197 .haiku, .dragonfly, .netbsd, .freebsd, .kfreebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {
6197 .haiku, .dragonfly, .netbsd, .freebsd, .macos, .ios, .tvos, .watchos, .visionos => enum(c_int) {
61986198 /// address family for hostname not supported
61996199 ADDRFAMILY = 1,
62006200 /// temporary failure in name resolution
......@@ -6455,7 +6455,7 @@ pub const Stat = switch (native_os) {
64556455 return self.birthtimespec;
64566456 }
64576457 },
6458 .freebsd, .kfreebsd => freebsd.Stat,
6458 .freebsd => freebsd.Stat,
64596459 .solaris, .illumos => extern struct {
64606460 dev: dev_t,
64616461 ino: ino_t,
......@@ -6640,7 +6640,7 @@ pub const pthread_mutex_t = switch (native_os) {
66406640
66416641 const data_len = if (@sizeOf(usize) == 8) 56 else 40;
66426642 },
6643 .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct {
6643 .freebsd, .dragonfly, .openbsd => extern struct {
66446644 inner: ?*anyopaque = null,
66456645 },
66466646 .hermit => extern struct {
......@@ -6689,7 +6689,7 @@ pub const pthread_cond_t = switch (native_os) {
66896689 data: [data_len]u8 = [_]u8{0} ** data_len,
66906690 const data_len = if (@sizeOf(usize) == 8) 40 else 24;
66916691 },
6692 .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct {
6692 .freebsd, .dragonfly, .openbsd => extern struct {
66936693 inner: ?*anyopaque = null,
66946694 },
66956695 .hermit => extern struct {
......@@ -6741,7 +6741,7 @@ pub const pthread_rwlock_t = switch (native_os) {
67416741 sig: c_long = 0x2DA8B3B4,
67426742 data: [192]u8 = [_]u8{0} ** 192,
67436743 },
6744 .freebsd, .kfreebsd, .dragonfly, .openbsd => extern struct {
6744 .freebsd, .dragonfly, .openbsd => extern struct {
67456745 ptr: ?*anyopaque = null,
67466746 },
67476747 .hermit => extern struct {
......@@ -6788,7 +6788,7 @@ pub const pthread_attr_t = switch (native_os) {
67886788 __sig: c_long,
67896789 __opaque: [56]u8,
67906790 },
6791 .freebsd, .kfreebsd => extern struct {
6791 .freebsd => extern struct {
67926792 inner: ?*anyopaque = null,
67936793 },
67946794 .solaris, .illumos => extern struct {
......@@ -6846,7 +6846,7 @@ pub const sem_t = switch (native_os) {
68466846 __size: [4 * @sizeOf(usize)]u8 align(@alignOf(usize)),
68476847 },
68486848 .macos, .ios, .tvos, .watchos, .visionos => c_int,
6849 .freebsd, .kfreebsd => extern struct {
6849 .freebsd => extern struct {
68506850 _magic: u32,
68516851 _kern: extern struct {
68526852 _count: u32,
......@@ -6903,7 +6903,7 @@ pub const Kevent = switch (native_os) {
69036903 assert(@offsetOf(@This(), "udata") == 24);
69046904 }
69056905 },
6906 .freebsd, .kfreebsd => extern struct {
6906 .freebsd => extern struct {
69076907 /// Identifier for this event.
69086908 ident: usize,
69096909 /// Filter for event.
......@@ -6974,7 +6974,7 @@ pub const AT = switch (native_os) {
69746974 /// Path refers to directory
69756975 pub const REMOVEDIR = 0x0080;
69766976 },
6977 .freebsd, .kfreebsd => struct {
6977 .freebsd => struct {
69786978 /// Magic value that specify the use of the current working directory
69796979 /// to determine the target of relative file paths in the openat() and
69806980 /// similar syscalls.
......@@ -7260,7 +7260,7 @@ pub const O = switch (native_os) {
72607260 DIRECTORY: bool = false,
72617261 _: u4 = 0,
72627262 },
7263 .freebsd, .kfreebsd => packed struct(u32) {
7263 .freebsd => packed struct(u32) {
72647264 ACCMODE: std.posix.ACCMODE = .RDONLY,
72657265 NONBLOCK: bool = false,
72667266 APPEND: bool = false,
......@@ -7405,7 +7405,7 @@ pub const MAP = switch (native_os) {
74057405 SIZEALIGN: bool = false,
74067406 _: u13 = 0,
74077407 },
7408 .freebsd, .kfreebsd => packed struct(u32) {
7408 .freebsd => packed struct(u32) {
74097409 TYPE: enum(u4) {
74107410 SHARED = 0x01,
74117411 PRIVATE = 0x02,
......@@ -7455,7 +7455,7 @@ pub const V = switch (native_os) {
74557455 TIME,
74567456 STATUS,
74577457 },
7458 .freebsd, .kfreebsd => enum {
7458 .freebsd => enum {
74597459 EOF,
74607460 EOL,
74617461 EOL2,
......@@ -7533,7 +7533,7 @@ pub const V = switch (native_os) {
75337533
75347534pub const NCCS = switch (native_os) {
75357535 .linux => linux.NCCS,
7536 .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .kfreebsd, .netbsd, .openbsd, .dragonfly => 20,
7536 .macos, .ios, .tvos, .watchos, .visionos, .freebsd, .netbsd, .openbsd, .dragonfly => 20,
75377537 .haiku => 11,
75387538 .solaris, .illumos => 19,
75397539 .emscripten, .wasi => 32,
......@@ -7551,7 +7551,7 @@ pub const termios = switch (native_os) {
75517551 ispeed: speed_t align(8),
75527552 ospeed: speed_t,
75537553 },
7554 .freebsd, .kfreebsd, .netbsd, .dragonfly, .openbsd => extern struct {
7554 .freebsd, .netbsd, .dragonfly, .openbsd => extern struct {
75557555 iflag: tc_iflag_t,
75567556 oflag: tc_oflag_t,
75577557 cflag: tc_cflag_t,
......@@ -7610,7 +7610,7 @@ pub const tc_iflag_t = switch (native_os) {
76107610 IUTF8: bool = false,
76117611 _: u49 = 0,
76127612 },
7613 .netbsd, .freebsd, .kfreebsd, .dragonfly => packed struct(u32) {
7613 .netbsd, .freebsd, .dragonfly => packed struct(u32) {
76147614 IGNBRK: bool = false,
76157615 BRKINT: bool = false,
76167616 IGNPAR: bool = false,
......@@ -7742,7 +7742,7 @@ pub const tc_oflag_t = switch (native_os) {
77427742 ONLRET: bool = false,
77437743 _: u24 = 0,
77447744 },
7745 .freebsd, .kfreebsd, .dragonfly => packed struct(u32) {
7745 .freebsd, .dragonfly => packed struct(u32) {
77467746 OPOST: bool = false,
77477747 ONLCR: bool = false,
77487748 _2: u1 = 0,
......@@ -7818,7 +7818,7 @@ pub const tc_cflag_t = switch (native_os) {
78187818 CCAR_OFLOW: bool = false,
78197819 _: u43 = 0,
78207820 },
7821 .freebsd, .kfreebsd => packed struct(u32) {
7821 .freebsd => packed struct(u32) {
78227822 CIGNORE: bool = false,
78237823 _1: u7 = 0,
78247824 CSIZE: CSIZE = .CS5,
......@@ -7959,7 +7959,7 @@ pub const tc_lflag_t = switch (native_os) {
79597959 NOFLSH: bool = false,
79607960 _: u32 = 0,
79617961 },
7962 .netbsd, .freebsd, .kfreebsd, .dragonfly => packed struct(u32) {
7962 .netbsd, .freebsd, .dragonfly => packed struct(u32) {
79637963 ECHOKE: bool = false,
79647964 ECHOE: bool = false,
79657965 ECHOK: bool = false,
......@@ -8086,7 +8086,7 @@ pub const speed_t = switch (native_os) {
80868086 B115200 = 115200,
80878087 B230400 = 230400,
80888088 },
8089 .freebsd, .kfreebsd, .netbsd => enum(c_uint) {
8089 .freebsd, .netbsd => enum(c_uint) {
80908090 B0 = 0,
80918091 B50 = 50,
80928092 B75 = 75,
......@@ -8250,7 +8250,7 @@ pub const NSIG = switch (native_os) {
82508250 .linux => linux.NSIG,
82518251 .windows => 23,
82528252 .haiku => 65,
8253 .netbsd, .freebsd, .kfreebsd => 32,
8253 .netbsd, .freebsd => 32,
82548254 .solaris, .illumos => 75,
82558255 .openbsd => 33,
82568256 else => {},
......@@ -8258,7 +8258,7 @@ pub const NSIG = switch (native_os) {
82588258
82598259pub const MINSIGSTKSZ = switch (native_os) {
82608260 .macos, .ios, .tvos, .watchos, .visionos => 32768,
8261 .freebsd, .kfreebsd => switch (builtin.cpu.arch) {
8261 .freebsd => switch (builtin.cpu.arch) {
82628262 .x86, .x86_64 => 2048,
82638263 .arm, .aarch64 => 4096,
82648264 else => @compileError("unsupported arch"),
......@@ -8270,7 +8270,7 @@ pub const MINSIGSTKSZ = switch (native_os) {
82708270};
82718271pub const SIGSTKSZ = switch (native_os) {
82728272 .macos, .ios, .tvos, .watchos, .visionos => 131072,
8273 .netbsd, .freebsd, .kfreebsd => MINSIGSTKSZ + 32768,
8273 .netbsd, .freebsd => MINSIGSTKSZ + 32768,
82748274 .solaris, .illumos => 8192,
82758275 .haiku => 16384,
82768276 .openbsd => MINSIGSTKSZ + (1 << openbsd.MAX_PAGE_SHIFT) * 4,
......@@ -8278,7 +8278,7 @@ pub const SIGSTKSZ = switch (native_os) {
82788278};
82798279pub const SS = switch (native_os) {
82808280 .linux => linux.SS,
8281 .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd, .kfreebsd => struct {
8281 .openbsd, .macos, .ios, .tvos, .watchos, .visionos, .netbsd, .freebsd => struct {
82828282 pub const ONSTACK = 1;
82838283 pub const DISABLE = 4;
82848284 },
......@@ -8882,7 +8882,7 @@ pub extern "c" fn fopen64(noalias filename: [*:0]const u8, noalias modes: [*:0]c
88828882pub extern "c" fn ftruncate64(fd: c_int, length: off_t) c_int;
88838883pub extern "c" fn fallocate(fd: fd_t, mode: c_int, offset: off_t, len: off_t) c_int;
88848884pub const sendfile = switch (native_os) {
8885 .freebsd, .kfreebsd => freebsd.sendfile,
8885 .freebsd => freebsd.sendfile,
88868886 .macos, .ios, .tvos, .watchos, .visionos => darwin.sendfile,
88878887 .linux => private.sendfile,
88888888 else => {},
......@@ -8899,12 +8899,12 @@ pub const sigaltstack = switch (native_os) {
88998899
89008900pub extern "c" fn memfd_create(name: [*:0]const u8, flags: c_uint) c_int;
89018901pub const pipe2 = switch (native_os) {
8902 .dragonfly, .emscripten, .netbsd, .freebsd, .kfreebsd, .solaris, .illumos, .openbsd, .linux => private.pipe2,
8902 .dragonfly, .emscripten, .netbsd, .freebsd, .solaris, .illumos, .openbsd, .linux => private.pipe2,
89038903 else => {},
89048904};
89058905pub const copy_file_range = switch (native_os) {
89068906 .linux => private.copy_file_range,
8907 .freebsd, .kfreebsd => freebsd.copy_file_range,
8907 .freebsd => freebsd.copy_file_range,
89088908 else => {},
89098909};
89108910
......@@ -9071,7 +9071,6 @@ pub const fork = switch (native_os) {
90719071 .dragonfly,
90729072 .freebsd,
90739073 .ios,
9074 .kfreebsd,
90759074 .linux,
90769075 .macos,
90779076 .netbsd,
......@@ -9683,7 +9682,7 @@ const private = struct {
96839682 extern "c" fn fstatat(dirfd: fd_t, path: [*:0]const u8, buf: *Stat, flag: u32) c_int;
96849683 extern "c" fn getdirentries(fd: fd_t, buf_ptr: [*]u8, nbytes: usize, basep: *i64) isize;
96859684 extern "c" fn getdents(fd: c_int, buf_ptr: [*]u8, nbytes: usize) switch (native_os) {
9686 .freebsd, .kfreebsd => isize,
9685 .freebsd => isize,
96879686 .solaris, .illumos => usize,
96889687 else => c_int,
96899688 };
lib/std/c/freebsd.zig+1-1
......@@ -22,7 +22,7 @@ const sf_hdtr = std.c.sf_hdtr;
2222const clockid_t = std.c.clockid_t;
2323
2424comptime {
25 assert(builtin.os.tag == .freebsd or builtin.os.tag == .kfreebsd); // Prevent access of std.c symbols on wrong OS.
25 assert(builtin.os.tag == .freebsd); // Prevent access of std.c symbols on wrong OS.
2626}
2727
2828pub extern "c" fn kinfo_getfile(pid: pid_t, cntp: *c_int) ?[*]kinfo_file;
src/codegen/llvm.zig-2
......@@ -111,7 +111,6 @@ pub fn targetTriple(allocator: Allocator, target: std.Target) ![]const u8 {
111111 .dragonfly => "dragonfly",
112112 .freebsd => "freebsd",
113113 .fuchsia => "fuchsia",
114 .kfreebsd => "kfreebsd",
115114 .linux => "linux",
116115 .lv2 => "lv2",
117116 .netbsd => "netbsd",
......@@ -234,7 +233,6 @@ pub fn targetOs(os_tag: std.Target.Os.Tag) llvm.OSType {
234233 .freebsd => .FreeBSD,
235234 .fuchsia => .Fuchsia,
236235 .ios => .IOS,
237 .kfreebsd => .KFreeBSD,
238236 .linux => .Linux,
239237 .lv2 => .Lv2,
240238 .macos => .MacOSX,