From ce95ea11132b0800959b4fe991cb9566f35143e4 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 fd1723b86ab18cbba30c7fe56d9c25352441d376..c99e5e4fe592957eb5a6fb7e95397d38694bf8b5 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -3315,7 +3315,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