relibc: add CRTSCTS and TIOCM serial port constants for Redox

- termios/redox.rs: CRTSCTS hardware flow control flag
- sys_ioctl/redox/mod.rs: TIOCM_LE/DTR/RTS/ST/SR/CTS/CAR/CD/RNG/RI/DSR
  modem line constants, TIOCMGET/TIOCMSET ioctl numbers

These enable qtserialport to compile without source-mutating python
injections that wrap serial port code in #ifdef guards.
This commit is contained in:
Red Bear OS
2026-07-10 14:26:12 +03:00
parent 32df50c8fa
commit afae337004
2 changed files with 15 additions and 0 deletions
+14
View File
@@ -38,6 +38,20 @@ pub const FIONREAD: c_ulong = 0x541B;
pub const FIONBIO: c_ulong = 0x5421;
pub const TIOCM_LE: c_ulong = 0x001;
pub const TIOCM_DTR: c_ulong = 0x002;
pub const TIOCM_RTS: c_ulong = 0x004;
pub const TIOCM_ST: c_ulong = 0x008;
pub const TIOCM_SR: c_ulong = 0x010;
pub const TIOCM_CTS: c_ulong = 0x020;
pub const TIOCM_CAR: c_ulong = 0x040;
pub const TIOCM_CD: c_ulong = TIOCM_CAR;
pub const TIOCM_RNG: c_ulong = 0x080;
pub const TIOCM_RI: c_ulong = TIOCM_RNG;
pub const TIOCM_DSR: c_ulong = 0x100;
pub const TIOCMGET: c_ulong = 0x5415;
pub const TIOCMSET: c_ulong = 0x5418;
pub const TIOCSPTLCK: c_ulong = 0x4004_5431;
pub const TIOCGPTLCK: c_ulong = 0x8004_5439;
+1
View File
@@ -92,6 +92,7 @@ pub const PARODD: usize = 0o020_000;
pub const HUPCL: usize = 0o040_000;
pub const CLOCAL: usize = 0o0100000;
pub const CRTSCTS: usize = 0o20_000_000_000;
/* } c_clfag */
/* c_lflag { */