Skip to content

Commit 3ae240c

Browse files
committed
Add termios control flags
1 parent 13c7558 commit 3ae240c

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
lines changed

src/unix/bsd/freebsdlike/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,11 @@ pub const EXTB: speed_t = 38400;
861861
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
862862

863863
pub const CRTSCTS: ::tcflag_t = 0x00030000;
864+
pub const CCTS_OFLOW: ::tcflag_t = 0x00010000;
865+
pub const CRTS_IFLOW: ::tcflag_t = 0x00020000;
866+
pub const CDTR_IFLOW: ::tcflag_t = 0x00040000;
867+
pub const CDSR_OFLOW: ::tcflag_t = 0x00080000;
868+
pub const CCAR_OFLOW: ::tcflag_t = 0x00100000;
864869
pub const VERASE2: usize = 7;
865870
pub const OCRNL: ::tcflag_t = 0x10;
866871

src/unix/bsd/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ pub const OPOST: ::tcflag_t = 0x1;
259259
pub const ONLCR: ::tcflag_t = 0x2;
260260
pub const OXTABS: ::tcflag_t = 0x4;
261261
pub const ONOEOT: ::tcflag_t = 0x8;
262+
pub const CIGNORE: ::tcflag_t = 0x00000001;
262263
pub const CSIZE: ::tcflag_t = 0x00000300;
263264
pub const CS5: ::tcflag_t = 0x00000000;
264265
pub const CS6: ::tcflag_t = 0x00000100;
@@ -285,6 +286,7 @@ pub const TOSTOP: ::tcflag_t = 0x00400000;
285286
pub const FLUSHO: ::tcflag_t = 0x00800000;
286287
pub const PENDIN: ::tcflag_t = 0x20000000;
287288
pub const NOFLSH: ::tcflag_t = 0x80000000;
289+
pub const MDMBUF: ::tcflag_t = 0x00100000;
288290

289291
pub const WNOHANG: ::c_int = 0x00000001;
290292
pub const WUNTRACED: ::c_int = 0x00000002;

src/unix/bsd/netbsdlike/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,9 @@ pub const EXTB: speed_t = 38400;
538538

539539
pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t;
540540

541+
pub const CRTSCTS: ::tcflag_t = 0x00010000;
542+
pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS;
543+
pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS;
541544
pub const OCRNL: ::tcflag_t = 0x10;
542545

543546
f! {

src/unix/bsd/netbsdlike/netbsd/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,6 @@ pub const NOTE_TRACK: ::uint32_t = 0x00000001;
463463
pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
464464
pub const NOTE_CHILD: ::uint32_t = 0x00000004;
465465

466-
pub const CRTSCTS: ::tcflag_t = 0x00010000;
467-
468466
pub const TMP_MAX : ::c_uint = 308915776;
469467

470468
pub const NI_MAXHOST: ::socklen_t = 1025;
@@ -644,6 +642,9 @@ pub const P_PGID: idtype_t = 4;
644642
pub const B460800: ::speed_t = 460800;
645643
pub const B921600: ::speed_t = 921600;
646644

645+
pub const CDTRCTS: ::tcflag_t = 0x00020000;
646+
pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
647+
647648
// dirfd() is a macro on netbsd to access
648649
// the first field of the struct where dirp points to:
649650
// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36

src/unix/bsd/netbsdlike/openbsdlike/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ pub const KI_WMESGLEN: ::c_int = 8;
460460
pub const KI_MAXLOGNAME: ::c_int = 32;
461461
pub const KI_EMULNAMELEN: ::c_int = 8;
462462

463+
pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS;
463464
pub const OLCUC: ::tcflag_t = 0x20;
464465
pub const ONOCR: ::tcflag_t = 0x40;
465466
pub const ONLRET: ::tcflag_t = 0x80;

src/unix/notbsd/android/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
734734

735735
pub const SIGEV_THREAD_ID: ::c_int = 4;
736736

737+
pub const CMSPAR: ::tcflag_t = 0o10000000000;
738+
pub const CIBAUD: ::tcflag_t = 0o02003600000;
739+
pub const CBAUDEX: ::tcflag_t = 0o010000;
740+
737741
f! {
738742
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
739743
for slot in cpuset.__bits.iter_mut() {

src/unix/notbsd/linux/other/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ pub const NLA_F_NESTED: ::c_int = 1 << 15;
443443
pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14;
444444
pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER);
445445

446+
pub const CMSPAR: ::tcflag_t = 0o10000000000;
447+
446448
cfg_if! {
447449
if #[cfg(any(target_arch = "arm", target_arch = "x86",
448450
target_arch = "x86_64"))] {

0 commit comments

Comments
 (0)