authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 06:53:37+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-19 06:56:12+02:00
logce95ea11132b0800959b4fe991cb9566f35143e4
treee4c470d127569637a87f5fe3d398c1bc9389f6fd
parent7a310e4ab617928b8ec4159527af6dc0f8c6b129
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.Target: fix cTypeBitSize(.{long,ulong}) for plan9

They really made this choice *after* Microsoft's mistake.

1 files changed, 4 insertions(+), 1 deletions(-)

lib/std/Target.zig+4-1
......@@ -3315,7 +3315,10 @@ pub fn cTypeBitSize(target: *const Target, c_type: CType) ?u16 {
33153315 .char => 8,
33163316 .short, .ushort => 16,
33173317 .int, .uint, .float => 32,
3318 .long, .ulong => target.ptrBitWidth(),
3318 .long, .ulong => switch (target.os.tag) {
3319 .plan9 => 32, // This is certainly A Choice.
3320 else => target.ptrBitWidth(),
3321 },
33193322 .longlong, .ulonglong, .double => 64,
33203323 .longdouble => switch (target.cpu.arch) {
33213324 .x86,