Source
pub const tc_lflag_t = switch (native_os) {
.linux => linux.tc_lflag_t,
.macos, .ios, .tvos, .watchos, .visionos => packed struct(u64) {
ECHOKE: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHO: bool = false,
ECHONL: bool = false,
ECHOPRT: bool = false,
ECHOCTL: bool = false,
ISIG: bool = false,
ICANON: bool = false,
ALTWERASE: bool = false,
IEXTEN: bool = false,
EXTPROC: bool = false,
_12: u10 = 0,
TOSTOP: bool = false,
FLUSHO: bool = false,
_24: u1 = 0,
NOKERNINFO: bool = false,
_26: u3 = 0,
PENDIN: bool = false,
_30: u1 = 0,
NOFLSH: bool = false,
_: u32 = 0,
},
.netbsd, .freebsd, .dragonfly => packed struct(u32) {
ECHOKE: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHO: bool = false,
ECHONL: bool = false,
ECHOPRT: bool = false,
ECHOCTL: bool = false,
ISIG: bool = false,
ICANON: bool = false,
ALTWERASE: bool = false,
IEXTEN: bool = false,
EXTPROC: bool = false,
_12: u10 = 0,
TOSTOP: bool = false,
FLUSHO: bool = false,
_24: u1 = 0,
NOKERNINFO: bool = false,
_26: u3 = 0,
PENDIN: bool = false,
_30: u1 = 0,
NOFLSH: bool = false,
},
.openbsd => packed struct(u32) {
ECHOKE: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHO: bool = false,
ECHONL: bool = false,
ECHOPRT: bool = false,
ECHOCTL: bool = false,
ISIG: bool = false,
ICANON: bool = false,
ALTWERASE: bool = false,
IEXTEN: bool = false,
EXTPROC: bool = false,
_12: u10 = 0,
TOSTOP: bool = false,
FLUSHO: bool = false,
XCASE: bool = false,
NOKERNINFO: bool = false,
_26: u3 = 0,
PENDIN: bool = false,
_30: u1 = 0,
NOFLSH: bool = false,
},
.haiku => packed struct(u32) {
ISIG: bool = false,
ICANON: bool = false,
XCASE: bool = false,
ECHO: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHONL: bool = false,
NOFLSH: bool = false,
TOSTOP: bool = false,
IEXTEN: bool = false,
ECHOCTL: bool = false,
ECHOPRT: bool = false,
ECHOKE: bool = false,
FLUSHO: bool = false,
PENDIN: bool = false,
_: u17 = 0,
},
.solaris, .illumos => packed struct(u32) {
ISIG: bool = false,
ICANON: bool = false,
XCASE: bool = false,
ECHO: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHONL: bool = false,
NOFLSH: bool = false,
TOSTOP: bool = false,
ECHOCTL: bool = false,
ECHOPRT: bool = false,
ECHOKE: bool = false,
DEFECHO: bool = false,
FLUSHO: bool = false,
PENDIN: bool = false,
IEXTEN: bool = false,
_: u16 = 0,
},
.wasi, .emscripten => packed struct(u32) {
ISIG: bool = false,
ICANON: bool = false,
_2: u1 = 0,
ECHO: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHONL: bool = false,
NOFLSH: bool = false,
TOSTOP: bool = false,
_9: u6 = 0,
IEXTEN: bool = false,
_: u16 = 0,
},
// https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L168-L189
.serenity => packed struct(u32) {
ISIG: bool = false,
ICANON: bool = false,
XCASE: bool = false,
ECHO: bool = false,
ECHOE: bool = false,
ECHOK: bool = false,
ECHONL: bool = false,
NOFLSH: bool = false,
TOSTOP: bool = false,
ECHOCTL: bool = false,
ECHOPRT: bool = false,
ECHOKE: bool = false,
FLUSHO: bool = false,
PENDIN: bool = false,
_14: u6 = 0,
IEXTEN: bool = false,
EXTPROC: bool = false,
_: u15 = 0,
},
else => void,
}