From bd7dfd133bc857852366f9c8d2425ea1bd7208b5 Mon Sep 17 00:00:00 2001 From: Bryant Mairs <bryant@mai.rs> Date: Thu, 22 Jun 2017 12:15:15 -0700 Subject: [PATCH] Add termios control character indices --- src/unix/bsd/freebsdlike/dragonfly/mod.rs | 2 ++ src/unix/bsd/freebsdlike/mod.rs | 1 + src/unix/bsd/mod.rs | 3 +++ src/unix/haiku/mod.rs | 13 +++++++++++++ src/unix/notbsd/android/mod.rs | 1 + src/unix/notbsd/linux/mips/mod.rs | 1 + src/unix/notbsd/linux/mod.rs | 2 ++ src/unix/notbsd/linux/musl/mod.rs | 1 + src/unix/notbsd/linux/other/b32/arm.rs | 1 + src/unix/notbsd/linux/other/b32/powerpc.rs | 1 + src/unix/notbsd/linux/other/b32/x86.rs | 1 + src/unix/notbsd/linux/other/b64/aarch64.rs | 1 + src/unix/notbsd/linux/other/b64/powerpc64.rs | 1 + src/unix/notbsd/linux/other/b64/sparc64.rs | 1 + src/unix/notbsd/linux/other/b64/x86_64.rs | 1 + src/unix/notbsd/linux/s390x.rs | 1 + 16 files changed, 32 insertions(+) diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 889e77f0..c7f0b956 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -412,6 +412,8 @@ pub const AT_REMOVEDIR: ::c_int = 2; pub const AT_EACCESS: ::c_int = 4; pub const AT_SYMLINK_FOLLOW: ::c_int = 8; +pub const VCHECKPT: usize = 19; + extern { pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 2929df04..22d31c7c 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -861,6 +861,7 @@ pub const EXTB: speed_t = 38400; pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; pub const CRTSCTS: ::tcflag_t = 0x00030000; +pub const VERASE2: usize = 7; pub const OCRNL: ::tcflag_t = 0x10; pub const ONOCR: ::tcflag_t = 0x20; pub const ONLRET: ::tcflag_t = 0x40; diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index e14b5b5f..62679be5 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -233,12 +233,15 @@ pub const VREPRINT: usize = 6; pub const VINTR: usize = 8; pub const VQUIT: usize = 9; pub const VSUSP: usize = 10; +pub const VDSUSP: usize = 11; pub const VSTART: usize = 12; pub const VSTOP: usize = 13; pub const VLNEXT: usize = 14; pub const VDISCARD: usize = 15; pub const VMIN: usize = 16; pub const VTIME: usize = 17; +pub const VSTATUS: usize = 18; +pub const _POSIX_VDISABLE: ::cc_t = 0xff; pub const IGNBRK: ::tcflag_t = 0x00000001; pub const BRKINT: ::tcflag_t = 0x00000002; pub const IGNPAR: ::tcflag_t = 0x00000004; diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index 6734795c..e3bb9ab8 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -686,6 +686,19 @@ pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; pub const P_PGID: idtype_t = 2; +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 VEOL: usize = 5; +pub const VMIN: usize = 4; +pub const VTIME: usize = 5; +pub const VEOL2: usize = 6; +pub const VSWTCH: usize = 7; +pub const VSTART: usize = 8; +pub const VSTOP: usize = 9; +pub const VSUSP: usize = 10; pub const OLCUC: ::tcflag_t = 0o000002; pub const OCRNL: ::tcflag_t = 0o000010; pub const ONOCR: ::tcflag_t = 0o000020; diff --git a/src/unix/notbsd/android/mod.rs b/src/unix/notbsd/android/mod.rs index 2fb131b1..d4f73cdb 100644 --- a/src/unix/notbsd/android/mod.rs +++ b/src/unix/notbsd/android/mod.rs @@ -626,6 +626,7 @@ pub const ISIG: ::tcflag_t = 0x00000001; pub const ICANON: ::tcflag_t = 0x00000002; pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/mips/mod.rs b/src/unix/notbsd/linux/mips/mod.rs index 8555cce3..9ca0ee2f 100644 --- a/src/unix/notbsd/linux/mips/mod.rs +++ b/src/unix/notbsd/linux/mips/mod.rs @@ -492,6 +492,7 @@ pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/mod.rs b/src/unix/notbsd/linux/mod.rs index 7404f2ce..6e207a40 100644 --- a/src/unix/notbsd/linux/mod.rs +++ b/src/unix/notbsd/linux/mod.rs @@ -711,6 +711,8 @@ pub const ITIMER_PROF: ::c_int = 2; pub const XATTR_CREATE: ::c_int = 0x1; pub const XATTR_REPLACE: ::c_int = 0x2; +pub const _POSIX_VDISABLE: ::cc_t = 0; + // On Linux, libc doesn't define this constant, libattr does instead. // We still define it for Linux as it's defined by libc on other platforms, // and it's mentioned in the man pages for getxattr and setxattr. diff --git a/src/unix/notbsd/linux/musl/mod.rs b/src/unix/notbsd/linux/musl/mod.rs index 31ea45e8..7a1dcb9b 100644 --- a/src/unix/notbsd/linux/musl/mod.rs +++ b/src/unix/notbsd/linux/musl/mod.rs @@ -283,6 +283,7 @@ pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CMSPAR: ::tcflag_t = 0o10000000000; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/other/b32/arm.rs b/src/unix/notbsd/linux/other/b32/arm.rs index ec376927..830fcaac 100644 --- a/src/unix/notbsd/linux/other/b32/arm.rs +++ b/src/unix/notbsd/linux/other/b32/arm.rs @@ -143,6 +143,7 @@ pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/other/b32/powerpc.rs b/src/unix/notbsd/linux/other/b32/powerpc.rs index cb15857a..d658a5bc 100644 --- a/src/unix/notbsd/linux/other/b32/powerpc.rs +++ b/src/unix/notbsd/linux/other/b32/powerpc.rs @@ -144,6 +144,7 @@ pub const ISIG: ::tcflag_t = 0x80; pub const ICANON: ::tcflag_t = 0x100; pub const PENDIN: ::tcflag_t = 0x20000000; pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const VSWTC: usize = 9; pub const OLCUC: ::tcflag_t = 0o000004; pub const NLDLY: ::tcflag_t = 0o001400; pub const CRDLY: ::tcflag_t = 0o030000; diff --git a/src/unix/notbsd/linux/other/b32/x86.rs b/src/unix/notbsd/linux/other/b32/x86.rs index d55d4408..04f0d476 100644 --- a/src/unix/notbsd/linux/other/b32/x86.rs +++ b/src/unix/notbsd/linux/other/b32/x86.rs @@ -249,6 +249,7 @@ pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/other/b64/aarch64.rs b/src/unix/notbsd/linux/other/b64/aarch64.rs index a8d0f8da..a3ca9481 100644 --- a/src/unix/notbsd/linux/other/b64/aarch64.rs +++ b/src/unix/notbsd/linux/other/b64/aarch64.rs @@ -387,6 +387,7 @@ pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/other/b64/powerpc64.rs b/src/unix/notbsd/linux/other/b64/powerpc64.rs index 8899a004..719412ef 100644 --- a/src/unix/notbsd/linux/other/b64/powerpc64.rs +++ b/src/unix/notbsd/linux/other/b64/powerpc64.rs @@ -383,6 +383,7 @@ pub const ISIG: ::tcflag_t = 0x80; pub const ICANON: ::tcflag_t = 0x100; pub const PENDIN: ::tcflag_t = 0x20000000; pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const VSWTC: usize = 9; pub const OLCUC: ::tcflag_t = 0o000004; pub const NLDLY: ::tcflag_t = 0o001400; pub const CRDLY: ::tcflag_t = 0o030000; diff --git a/src/unix/notbsd/linux/other/b64/sparc64.rs b/src/unix/notbsd/linux/other/b64/sparc64.rs index c9c3484c..1edda700 100644 --- a/src/unix/notbsd/linux/other/b64/sparc64.rs +++ b/src/unix/notbsd/linux/other/b64/sparc64.rs @@ -344,6 +344,7 @@ pub const PENDIN: ::tcflag_t = 0x4000; pub const NOFLSH: ::tcflag_t = 0x80; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0x00001000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/other/b64/x86_64.rs b/src/unix/notbsd/linux/other/b64/x86_64.rs index 74f4b5a7..228258f2 100644 --- a/src/unix/notbsd/linux/other/b64/x86_64.rs +++ b/src/unix/notbsd/linux/other/b64/x86_64.rs @@ -507,6 +507,7 @@ pub const PENDIN: ::tcflag_t = 0x00004000; pub const NOFLSH: ::tcflag_t = 0x00000080; pub const CIBAUD: ::tcflag_t = 0o02003600000; pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const CRDLY: ::tcflag_t = 0o003000; diff --git a/src/unix/notbsd/linux/s390x.rs b/src/unix/notbsd/linux/s390x.rs index e77ff5c5..940b7621 100644 --- a/src/unix/notbsd/linux/s390x.rs +++ b/src/unix/notbsd/linux/s390x.rs @@ -693,6 +693,7 @@ pub const SYS_gettid: ::c_long = 236; pub const SYS_perf_event_open: ::c_long = 331; pub const CMSPAR: ::tcflag_t = 0o10000000000; +pub const VSWTC: usize = 7; pub const OLCUC: ::tcflag_t = 0o000002; pub const NLDLY: ::tcflag_t = 0o000400; pub const NL1: ::tcflag_t = 0x00000100; -- GitLab