authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-15 01:46:45+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-22 22:15:31+02:00
logeeed9ce598fca623d593d7867b2e07c98d4ae74e
tree11665119484e223f0a1e4c5b5d3bbb57f1a2df9d
parentbc479451ce6c30174b9be027356ec59a53f89e81
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.c: fix width of termios flag packed structs for haiku


1 files changed, 23 insertions(+), 7 deletions(-)

lib/std/c.zig+23-7
......@@ -9107,7 +9107,7 @@ pub const tc_iflag_t = switch (native_os) {
91079107 IMAXBEL: bool = false,
91089108 _: u18 = 0,
91099109 },
9110 .haiku => packed struct(u32) {
9110 .haiku => packed struct(u16) {
91119111 IGNBRK: bool = false,
91129112 BRKINT: bool = false,
91139113 IGNPAR: bool = false,
......@@ -9121,7 +9121,7 @@ pub const tc_iflag_t = switch (native_os) {
91219121 IXON: bool = false,
91229122 IXANY: bool = false,
91239123 IXOFF: bool = false,
9124 _: u19 = 0,
9124 _: u3 = 0,
91259125 },
91269126 .illumos => packed struct(u32) {
91279127 IGNBRK: bool = false,
......@@ -9235,8 +9235,24 @@ pub const tc_oflag_t = switch (native_os) {
92359235 WRAP: bool = false,
92369236 _: u14 = 0,
92379237 },
9238 .haiku => packed struct(u16) {
9239 OPOST: bool = false,
9240 OLCUC: bool = false,
9241 ONLCR: bool = false,
9242 OCRNL: bool = false,
9243 ONOCR: bool = false,
9244 ONLRET: bool = false,
9245 OFILL: bool = false,
9246 OFDEL: bool = false,
9247 NLDLY: u1 = 0,
9248 CRDLY: u2 = 0,
9249 TABDLY: u2 = 0,
9250 BSDLY: u1 = 0,
9251 VTDLY: u1 = 0,
9252 FFDLY: u1 = 0,
9253 },
92389254 // https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L69-L97
9239 .haiku, .emscripten, .serenity => packed struct(u32) {
9255 .emscripten, .serenity => packed struct(u32) {
92409256 OPOST: bool = false,
92419257 OLCUC: bool = false,
92429258 ONLCR: bool = false,
......@@ -9349,7 +9365,7 @@ pub const tc_cflag_t = switch (native_os) {
93499365 MDMBUF: bool = false,
93509366 _: u11 = 0,
93519367 },
9352 .haiku => packed struct(u32) {
9368 .haiku => packed struct(u16) {
93539369 _0: u5 = 0,
93549370 CSIZE: CSIZE = .CS7,
93559371 CSTOPB: bool = false,
......@@ -9361,7 +9377,7 @@ pub const tc_cflag_t = switch (native_os) {
93619377 XLOBLK: bool = false,
93629378 CTSFLOW: bool = false,
93639379 RTSFLOW: bool = false,
9364 _: u17 = 0,
9380 _: u1 = 0,
93659381 },
93669382 .illumos => packed struct(u32) {
93679383 _0: u4 = 0,
......@@ -9483,7 +9499,7 @@ pub const tc_lflag_t = switch (native_os) {
94839499 _30: u1 = 0,
94849500 NOFLSH: bool = false,
94859501 },
9486 .haiku => packed struct(u32) {
9502 .haiku => packed struct(u16) {
94879503 ISIG: bool = false,
94889504 ICANON: bool = false,
94899505 XCASE: bool = false,
......@@ -9499,7 +9515,7 @@ pub const tc_lflag_t = switch (native_os) {
94999515 ECHOKE: bool = false,
95009516 FLUSHO: bool = false,
95019517 PENDIN: bool = false,
9502 _: u17 = 0,
9518 _: u1 = 0,
95039519 },
95049520 .illumos => packed struct(u32) {
95059521 ISIG: bool = false,