Add termios support for redox

This commit is contained in:
Xavier L'Heureux 2019-08-15 08:13:50 -04:00
parent 37f8f8dc23
commit 5d85c37734

View File

@ -610,6 +610,124 @@ pub const SOCK_STREAM: ::c_int = 1;
pub const SOCK_DGRAM: ::c_int = 2;
pub const SOL_SOCKET: ::c_int = 1;
// sys/termios.h
pub const NCCS: usize = 32;
pub const VINTR: usize = 0;
pub const VQUIT: usize = 1;
pub const VERASE: usize = 2;
pub const VKILL: usize = 3;
pub const VEOF: usize = 4;
pub const VTIME: usize = 5;
pub const VMIN: usize = 6;
pub const VSWTC: usize = 7;
pub const VSTART: usize = 8;
pub const VSTOP: usize = 9;
pub const VSUSP: usize = 10;
pub const VEOL: usize = 11;
pub const VREPRINT: usize = 12;
pub const VDISCARD: usize = 13;
pub const VWERASE: usize = 14;
pub const VLNEXT: usize = 15;
pub const VEOL2: usize = 16;
pub const IGNBRK: ::tcflag_t = 0o000_001;
pub const BRKINT: ::tcflag_t = 0o000_002;
pub const IGNPAR: ::tcflag_t = 0o000_004;
pub const PARMRK: ::tcflag_t = 0o000_010;
pub const INPCK: ::tcflag_t = 0o000_020;
pub const ISTRIP: ::tcflag_t = 0o000_040;
pub const INLCR: ::tcflag_t = 0o000_100;
pub const IGNCR: ::tcflag_t = 0o000_200;
pub const ICRNL: ::tcflag_t = 0o000_400;
pub const IUCLC: ::tcflag_t = 0o001_000;
pub const IXON: ::tcflag_t = 0o002_000;
pub const IXANY: ::tcflag_t = 0o004_000;
pub const IXOFF: ::tcflag_t = 0o010_000;
pub const IMAXBEL: ::tcflag_t = 0o020_000;
pub const IUTF8: ::tcflag_t = 0o040_000;
pub const OPOST: ::tcflag_t = 0o000_001;
pub const OLCUC: ::tcflag_t = 0o000_002;
pub const ONLCR: ::tcflag_t = 0o000_004;
pub const OCRNL: ::tcflag_t = 0o000_010;
pub const ONOCR: ::tcflag_t = 0o000_020;
pub const ONLRET: ::tcflag_t = 0o00_0040;
pub const OFILL: ::tcflag_t = 0o000_100;
pub const OFDEL: ::tcflag_t = 0o000_200;
pub const VTDLY: usize = 0o040_000;
pub const VT0: usize = 0o000_000;
pub const VT1: usize = 0o040_000;
pub const B0: speed_t = 0o000_000;
pub const B50: speed_t = 0o000_001;
pub const B75: speed_t = 0o000_002;
pub const B110: speed_t = 0o000_003;
pub const B134: speed_t = 0o000_004;
pub const B150: speed_t = 0o000_005;
pub const B200: speed_t = 0o000_006;
pub const B300: speed_t = 0o000_007;
pub const B600: speed_t = 0o000_010;
pub const B1200: speed_t = 0o000_011;
pub const B1800: speed_t = 0o000_012;
pub const B2400: speed_t = 0o000_013;
pub const B4800: speed_t = 0o000_014;
pub const B9600: speed_t = 0o000_015;
pub const B19200: speed_t = 0o000_016;
pub const B38400: speed_t = 0o000_017;
pub const B57600: speed_t = 0o010_001;
pub const B115200: speed_t = 0o010_002;
pub const B230400: speed_t = 0o010_003;
pub const B460800: speed_t = 0o010_004;
pub const B500000: speed_t = 0o010_005;
pub const B576000: speed_t = 0o010_006;
pub const B921600: speed_t = 0o010_007;
pub const B1000000: speed_t = 0o010_010;
pub const B1152000: speed_t = 0o010_011;
pub const B1500000: speed_t = 0o010_012;
pub const B2000000: speed_t = 0o010_013;
pub const B2500000: speed_t = 0o010_014;
pub const B3000000: speed_t = 0o010_015;
pub const B3500000: speed_t = 0o010_016;
pub const B4000000: speed_t = 0o010_017;
pub const CSIZE: ::tcflag_t = 0o000_060;
pub const CS5: ::tcflag_t = 0o000_000;
pub const CS6: ::tcflag_t = 0o000_020;
pub const CS7: ::tcflag_t = 0o000_040;
pub const CS8: ::tcflag_t = 0o000_060;
pub const CSTOPB: ::tcflag_t = 0o000_100;
pub const CREAD: ::tcflag_t = 0o000_200;
pub const PARENB: ::tcflag_t = 0o000_400;
pub const PARODD: ::tcflag_t = 0o001_000;
pub const HUPCL: ::tcflag_t = 0o002_000;
pub const CLOCAL: ::tcflag_t = 0o004_000;
pub const ISIG: ::tcflag_t = 0o000_001;
pub const ICANON: ::tcflag_t = 0o000_002;
pub const ECHO: ::tcflag_t = 0o000_010;
pub const ECHOE: ::tcflag_t = 0o000_020;
pub const ECHOK: ::tcflag_t = 0o000_040;
pub const ECHONL: ::tcflag_t = 0o000_100;
pub const NOFLSH: ::tcflag_t = 0o000_200;
pub const TOSTOP: ::tcflag_t = 0o000_400;
pub const IEXTEN: ::tcflag_t = 0o100_000;
pub const TCOOFF: ::c_int = 0;
pub const TCOON: ::c_int = 1;
pub const TCIOFF: ::c_int = 2;
pub const TCION: ::c_int = 3;
pub const TCIFLUSH: ::c_int = 0;
pub const TCOFLUSH: ::c_int = 1;
pub const TCIOFLUSH: ::c_int = 2;
pub const TCSANOW: ::c_int = 0;
pub const TCSADRAIN: ::c_int = 1;
pub const TCSAFLUSH: ::c_int = 2;
// sys/wait.h
pub const WNOHANG: ::c_int = 1;
pub const WUNTRACED: ::c_int = 2;
@ -624,9 +742,6 @@ pub const __WALL: ::c_int = 0x4000_0000;
#[allow(overflowing_literals)]
pub const __WCLONE: ::c_int = 0x8000_0000;
// termios.h
pub const NCCS: usize = 32;
// time.h
pub const CLOCK_REALTIME: ::c_int = 1;
pub const CLOCK_MONOTONIC: ::c_int = 4;