summaryrefslogtreecommitdiffstats
path: root/vendor/rustix/src/termios/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/rustix/src/termios/mod.rs')
-rw-r--r--vendor/rustix/src/termios/mod.rs183
1 files changed, 136 insertions, 47 deletions
diff --git a/vendor/rustix/src/termios/mod.rs b/vendor/rustix/src/termios/mod.rs
index ec35f96fb..5c4cccca9 100644
--- a/vendor/rustix/src/termios/mod.rs
+++ b/vendor/rustix/src/termios/mod.rs
@@ -1,11 +1,15 @@
//! Terminal I/O stream operations.
+#[cfg(not(target_os = "wasi"))]
mod cf;
+#[cfg(not(target_os = "wasi"))]
mod constants;
+#[cfg(not(target_os = "wasi"))]
mod tc;
#[cfg(not(windows))]
mod tty;
+#[cfg(not(target_os = "wasi"))]
pub use cf::{cfgetispeed, cfgetospeed, cfmakeraw, cfsetispeed, cfsetospeed, cfsetspeed};
#[cfg(not(any(
target_os = "dragonfly",
@@ -16,6 +20,7 @@ pub use cf::{cfgetispeed, cfgetospeed, cfmakeraw, cfsetispeed, cfsetospeed, cfse
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B1000000;
#[cfg(not(any(
@@ -27,6 +32,7 @@ pub use constants::B1000000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B1152000;
#[cfg(not(any(
@@ -38,6 +44,7 @@ pub use constants::B1152000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B1500000;
#[cfg(not(any(
@@ -49,6 +56,7 @@ pub use constants::B1500000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B2000000;
#[cfg(not(any(
@@ -62,6 +70,7 @@ pub use constants::B2000000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B2500000;
#[cfg(not(any(
@@ -75,6 +84,7 @@ pub use constants::B2500000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B3000000;
#[cfg(not(any(
@@ -88,6 +98,7 @@ pub use constants::B3000000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B3500000;
#[cfg(not(any(
@@ -101,6 +112,7 @@ pub use constants::B3500000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B4000000;
#[cfg(not(any(
@@ -108,7 +120,8 @@ pub use constants::B4000000;
target_os = "haiku",
target_os = "ios",
target_os = "macos",
- target_os = "openbsd"
+ target_os = "openbsd",
+ target_os = "wasi",
)))]
pub use constants::B460800;
#[cfg(not(any(
@@ -121,6 +134,7 @@ pub use constants::B460800;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B500000;
#[cfg(not(any(
@@ -133,6 +147,7 @@ pub use constants::B500000;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::B576000;
#[cfg(not(any(
@@ -140,10 +155,11 @@ pub use constants::B576000;
target_os = "haiku",
target_os = "ios",
target_os = "macos",
- target_os = "openbsd"
+ target_os = "openbsd",
+ target_os = "wasi",
)))]
pub use constants::B921600;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::BRKINT;
#[cfg(not(any(
target_os = "dragonfly",
@@ -156,6 +172,7 @@ pub use constants::BRKINT;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::BS0;
#[cfg(not(any(
@@ -171,6 +188,7 @@ pub use constants::BS0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::BS1;
#[cfg(not(any(
@@ -183,6 +201,7 @@ pub use constants::BS1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::BSDLY;
#[cfg(not(any(
@@ -194,6 +213,7 @@ pub use constants::BSDLY;
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "wasi",
)))]
pub use constants::CBAUD;
#[cfg(not(any(
@@ -207,6 +227,7 @@ pub use constants::CBAUD;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CBAUDEX;
#[cfg(not(any(
@@ -219,9 +240,10 @@ pub use constants::CBAUDEX;
target_os = "netbsd",
target_os = "openbsd",
target_os = "redox",
+ target_os = "wasi",
)))]
pub use constants::CIBAUD;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CLOCAL;
#[cfg(not(any(
target_os = "dragonfly",
@@ -235,6 +257,7 @@ pub use constants::CLOCAL;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CMSPAR;
#[cfg(not(any(
@@ -248,6 +271,7 @@ pub use constants::CMSPAR;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CR0;
#[cfg(not(any(
@@ -263,6 +287,7 @@ pub use constants::CR0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CR1;
#[cfg(not(any(
@@ -278,6 +303,7 @@ pub use constants::CR1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CR2;
#[cfg(not(any(
@@ -293,6 +319,7 @@ pub use constants::CR2;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CR3;
#[cfg(not(any(
@@ -305,37 +332,58 @@ pub use constants::CR3;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::CRDLY;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CREAD;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::CRTSCTS;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CS5;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CS6;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CS7;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CS8;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CSIZE;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::CSTOPB;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ECHO;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::ECHOCTL;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ECHOE;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ECHOK;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::ECHOKE;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ECHONL;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::ECHOPRT;
#[cfg(not(any(
target_os = "emscripten",
@@ -345,6 +393,7 @@ pub use constants::ECHOPRT;
target_os = "macos",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::EXTA;
#[cfg(not(any(
@@ -355,13 +404,15 @@ pub use constants::EXTA;
target_os = "macos",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::EXTB;
#[cfg(not(any(
target_os = "haiku",
target_os = "ios",
target_os = "macos",
- target_os = "redox"
+ target_os = "redox",
+ target_os = "wasi",
)))]
pub use constants::EXTPROC;
#[cfg(not(any(
@@ -375,6 +426,7 @@ pub use constants::EXTPROC;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::FF0;
#[cfg(not(any(
@@ -390,6 +442,7 @@ pub use constants::FF0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::FF1;
#[cfg(not(any(
@@ -403,36 +456,43 @@ pub use constants::FF1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::FFDLY;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::FLUSHO;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::HUPCL;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ICRNL;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IEXTEN;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IGNBRK;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IGNCR;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IGNPAR;
#[cfg(not(any(
target_os = "haiku",
target_os = "ios",
target_os = "macos",
- target_os = "redox"
+ target_os = "redox",
+ target_os = "wasi",
)))]
pub use constants::IMAXBEL;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::INLCR;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::INPCK;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ISIG;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ISTRIP;
#[cfg(any(
linux_raw,
@@ -454,13 +514,19 @@ pub use constants::IUCLC;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::IUTF8;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::IXANY;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IXOFF;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::IXON;
#[cfg(not(any(
target_os = "dragonfly",
@@ -473,6 +539,7 @@ pub use constants::IXON;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::NL0;
#[cfg(not(any(
@@ -486,6 +553,7 @@ pub use constants::NL0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::NL1;
#[cfg(not(any(
@@ -498,11 +566,12 @@ pub use constants::NL1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::NLDLY;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::NOFLSH;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::OCRNL;
#[cfg(not(any(
target_os = "dragonfly",
@@ -511,6 +580,7 @@ pub use constants::OCRNL;
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
+ target_os = "wasi",
)))]
pub use constants::OFDEL;
#[cfg(not(any(
@@ -520,6 +590,7 @@ pub use constants::OFDEL;
target_os = "macos",
target_os = "netbsd",
target_os = "openbsd",
+ target_os = "wasi",
)))]
pub use constants::OFILL;
#[cfg(not(any(
@@ -529,23 +600,29 @@ pub use constants::OFILL;
target_os = "macos",
target_os = "netbsd",
target_os = "redox",
+ target_os = "wasi",
)))]
pub use constants::OLCUC;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ONLCR;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ONLRET;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::ONOCR;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::OPOST;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::PARENB;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::PARMRK;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::PARODD;
-#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))]
+#[cfg(not(any(
+ target_os = "ios",
+ target_os = "macos",
+ target_os = "redox",
+ target_os = "wasi"
+)))]
pub use constants::PENDIN;
#[cfg(not(any(
target_os = "dragonfly",
@@ -557,6 +634,7 @@ pub use constants::PENDIN;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::TAB0;
#[cfg(not(any(
@@ -572,6 +650,7 @@ pub use constants::TAB0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::TAB1;
#[cfg(not(any(
@@ -587,6 +666,7 @@ pub use constants::TAB1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::TAB2;
#[cfg(not(any(
@@ -601,6 +681,7 @@ pub use constants::TAB2;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::TAB3;
#[cfg(not(any(
@@ -612,9 +693,10 @@ pub use constants::TAB3;
target_os = "illumos",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::TABDLY;
-#[cfg(not(any(target_os = "ios", target_os = "macos")))]
+#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "wasi")))]
pub use constants::TOSTOP;
#[cfg(not(any(
target_os = "dragonfly",
@@ -626,6 +708,7 @@ pub use constants::TOSTOP;
target_os = "netbsd",
target_os = "openbsd",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::VSWTC;
#[cfg(not(any(
@@ -639,6 +722,7 @@ pub use constants::VSWTC;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::VT0;
#[cfg(not(any(
@@ -654,6 +738,7 @@ pub use constants::VT0;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::VT1;
#[cfg(not(any(
@@ -667,6 +752,7 @@ pub use constants::VT1;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::VTDLY;
#[cfg(any(linux_raw, all(libc, any(target_arch = "s390x", target_os = "haiku"))))]
@@ -682,15 +768,18 @@ pub use constants::XCASE;
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
+ target_os = "wasi",
)))]
pub use constants::XTABS;
+#[cfg(not(target_os = "wasi"))]
pub use constants::{
speed_value, B0, B110, B115200, B1200, B134, B150, B1800, B19200, B200, B230400, B2400, B300,
B38400, B4800, B50, B57600, B600, B75, B9600, ICANON, VEOF, VEOL, VEOL2, VERASE, VINTR, VKILL,
VMIN, VQUIT, VSTART, VSTOP, VSUSP, VTIME,
};
-#[cfg(not(target_os = "haiku"))]
+#[cfg(not(any(target_os = "haiku", target_os = "wasi")))]
pub use constants::{VDISCARD, VLNEXT, VREPRINT, VWERASE};
+#[cfg(not(target_os = "wasi"))]
pub use tc::{
tcdrain, tcflow, tcflush, tcgetattr, tcgetpgrp, tcgetsid, tcgetwinsize, tcsendbreak, tcsetattr,
tcsetpgrp, tcsetwinsize, Action, OptionalActions, QueueSelector, Speed, Tcflag, Termios,