Source
pub const tc_oflag_t = switch (native_os) {
.linux => linux.tc_oflag_t,
.macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
OPOST: bool = false,
ONLCR: bool = false,
OXTABS: bool = false,
ONOEOT: bool = false,
OCRNL: bool = false,
ONOCR: bool = false,
ONLRET: bool = false,
OFILL: bool = false,
NLDLY: u2 = 0,
TABDLY: u2 = 0,
CRDLY: u2 = 0,
FFDLY: u1 = 0,
BSDLY: u1 = 0,
VTDLY: u1 = 0,
OFDEL: bool = false,
_: u46 = 0,
},
.netbsd => packed struct(u32) {
OPOST: bool = false,
ONLCR: bool = false,
OXTABS: bool = false,
ONOEOT: bool = false,
OCRNL: bool = false,
_5: u1 = 0,
ONOCR: bool = false,
ONLRET: bool = false,
_: u24 = 0,
},
.openbsd => packed struct(u32) {
OPOST: bool = false,
ONLCR: bool = false,
OXTABS: bool = false,
ONOEOT: bool = false,
OCRNL: bool = false,
OLCUC: bool = false,
ONOCR: bool = false,
ONLRET: bool = false,
_: u24 = 0,
},
.freebsd, .dragonfly => packed struct(u32) {
OPOST: bool = false,
ONLCR: bool = false,
_2: u1 = 0,
ONOEOT: bool = false,
OCRNL: bool = false,
ONOCR: bool = false,
ONLRET: bool = false,
_: u25 = 0,
},
.solaris, .illumos => packed struct(u32) {
OPOST: bool = false,
OLCUC: bool = false,
ONLCR: bool = false,
OCRNL: bool = false,
ONOCR: bool = false,
ONLRET: bool = false,
OFILL: bool = false,
OFDEL: bool = false,
NLDLY: u1 = 0,
CRDLY: u2 = 0,
TABDLY: u2 = 0,
BSDLY: u1 = 0,
VTDLY: u1 = 0,
FFDLY: u1 = 0,
PAGEOUT: bool = false,
WRAP: bool = false,
_: u14 = 0,
},
// https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L69-L97
.haiku, .wasi, .emscripten, .serenity => packed struct(u32) {
OPOST: bool = false,
OLCUC: bool = false,
ONLCR: bool = false,
OCRNL: bool = false,
ONOCR: bool = false,
ONLRET: bool = false,
OFILL: bool = false,
OFDEL: bool = false,
NLDLY: u1 = 0,
CRDLY: u2 = 0,
TABDLY: u2 = 0,
BSDLY: u1 = 0,
VTDLY: u1 = 0,
FFDLY: u1 = 0,
_: u16 = 0,
},
else => void,
}