From b7d2a8253bc90194bd92b0d2db4e197faf5fafae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Mon, 19 Oct 2026 06:53:37 +0200 Subject: [PATCH] std.Target: fix cTypeBitSize(.{long,ulong}) for plan9 They really made this choice *after* Microsoft's mistake. --- lib/std/Target.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index e17fd1d51aaabe2069f1a8b27fa7b5b493855c71..fcdaa70732c9abfb7e24311ce266df7820938234 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -3337,7 +3337,10 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 { .char => 8, .short, .ushort => 16, .int, .uint, .float => 32, - .long, .ulong => target.ptrBitWidth(), + .long, .ulong => switch (target.os.tag) { + .plan9 => 32, // This is certainly A Choice. + else => target.ptrBitWidth(), + }, .longlong, .ulonglong, .double => 64, .longdouble => switch (target.cpu.arch) { .x86, -- 2.54.0