Source
pub const termios = switch (native_os) {
.linux => linux.termios,
.macos, .ios, .tvos, .watchos, .visionos => extern struct {
iflag: tc_iflag_t,
oflag: tc_oflag_t,
cflag: tc_cflag_t,
lflag: tc_lflag_t,
cc: [NCCS]cc_t,
ispeed: speed_t align(8),
ospeed: speed_t,
},
// https://github.com/SerenityOS/serenity/blob/d277cdfd4c7ed21d5248a83217ae03b9f890c3c8/Kernel/API/POSIX/termios.h#L21-L29
.freebsd, .netbsd, .dragonfly, .openbsd, .serenity => extern struct {
iflag: tc_iflag_t,
oflag: tc_oflag_t,
cflag: tc_cflag_t,
lflag: tc_lflag_t,
cc: [NCCS]cc_t,
ispeed: speed_t,
ospeed: speed_t,
},
.haiku => extern struct {
iflag: tc_iflag_t,
oflag: tc_oflag_t,
cflag: tc_cflag_t,
lflag: tc_lflag_t,
line: cc_t,
ispeed: speed_t,
ospeed: speed_t,
cc: [NCCS]cc_t,
},
.solaris, .illumos => extern struct {
iflag: tc_iflag_t,
oflag: tc_oflag_t,
cflag: tc_cflag_t,
lflag: tc_lflag_t,
cc: [NCCS]cc_t,
},
.emscripten, .wasi => extern struct {
iflag: tc_iflag_t,
oflag: tc_oflag_t,
cflag: tc_cflag_t,
lflag: tc_lflag_t,
line: cc_t,
cc: [NCCS]cc_t,
ispeed: speed_t,
ospeed: speed_t,
},
else => void,
}