diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:20:39 +0000 |
commit | 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch) | |
tree | 3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /vendor/rustix/src/backend/libc/termios | |
parent | Releasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip |
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/rustix/src/backend/libc/termios')
-rw-r--r-- | vendor/rustix/src/backend/libc/termios/syscalls.rs | 48 | ||||
-rw-r--r-- | vendor/rustix/src/backend/libc/termios/types.rs | 606 |
2 files changed, 218 insertions, 436 deletions
diff --git a/vendor/rustix/src/backend/libc/termios/syscalls.rs b/vendor/rustix/src/backend/libc/termios/syscalls.rs index f54e9a6f3..097d368ed 100644 --- a/vendor/rustix/src/backend/libc/termios/syscalls.rs +++ b/vendor/rustix/src/backend/libc/termios/syscalls.rs @@ -27,6 +27,27 @@ pub(crate) fn tcgetattr(fd: BorrowedFd<'_>) -> io::Result<Termios> { } } +#[cfg(all( + any(target_os = "android", target_os = "linux"), + any( + target_arch = "x86", + target_arch = "x86_64", + target_arch = "x32", + target_arch = "riscv64", + target_arch = "aarch64", + target_arch = "arm", + target_arch = "mips", + target_arch = "mips64", + ) +))] +pub(crate) fn tcgetattr2(fd: BorrowedFd<'_>) -> io::Result<crate::termios::Termios2> { + let mut result = MaybeUninit::<crate::termios::Termios2>::uninit(); + unsafe { + ret(c::ioctl(borrowed_fd(fd), c::TCGETS2, result.as_mut_ptr()))?; + Ok(result.assume_init()) + } +} + #[cfg(not(target_os = "wasi"))] pub(crate) fn tcgetpgrp(fd: BorrowedFd<'_>) -> io::Result<Pid> { unsafe { @@ -56,6 +77,33 @@ pub(crate) fn tcsetattr( } } +#[cfg(all( + any(target_os = "android", target_os = "linux"), + any( + target_arch = "x86", + target_arch = "x86_64", + target_arch = "x32", + target_arch = "riscv64", + target_arch = "aarch64", + target_arch = "arm", + target_arch = "mips", + target_arch = "mips64", + ) +))] +pub(crate) fn tcsetattr2( + fd: BorrowedFd, + optional_actions: OptionalActions, + termios: &crate::termios::Termios2, +) -> io::Result<()> { + unsafe { + ret(c::ioctl( + borrowed_fd(fd), + (c::TCSETS2 as u32 + optional_actions as u32) as _, + termios, + )) + } +} + #[cfg(not(target_os = "wasi"))] pub(crate) fn tcsendbreak(fd: BorrowedFd) -> io::Result<()> { unsafe { ret(c::tcsendbreak(borrowed_fd(fd), 0)) } diff --git a/vendor/rustix/src/backend/libc/termios/types.rs b/vendor/rustix/src/backend/libc/termios/types.rs index 6dda70064..bbacdbea0 100644 --- a/vendor/rustix/src/backend/libc/termios/types.rs +++ b/vendor/rustix/src/backend/libc/termios/types.rs @@ -7,13 +7,16 @@ use super::super::c; #[repr(i32)] pub enum OptionalActions { /// `TCSANOW`—Make the change immediately. + #[doc(alias = "TCSANOW")] Now = c::TCSANOW, /// `TCSADRAIN`—Make the change after all output has been transmitted. + #[doc(alias = "TCSADRAIN")] Drain = c::TCSADRAIN, /// `TCSAFLUSH`—Discard any pending input and then make the change /// after all output has been transmitted. + #[doc(alias = "TCSAFLUSH")] Flush = c::TCSAFLUSH, } @@ -24,12 +27,15 @@ pub enum OptionalActions { #[repr(i32)] pub enum QueueSelector { /// `TCIFLUSH`—Flush data received but not read. + #[doc(alias = "TCIFLUSH")] IFlush = c::TCIFLUSH, /// `TCOFLUSH`—Flush data written but not transmitted. + #[doc(alias = "TCOFLUSH")] OFlush = c::TCOFLUSH, /// `TCIOFLUSH`—`IFlush` and `OFlush` combined. + #[doc(alias = "TCIOFLUSH")] IOFlush = c::TCIOFLUSH, } @@ -40,34 +46,63 @@ pub enum QueueSelector { #[repr(i32)] pub enum Action { /// `TCOOFF`—Suspend output. + #[doc(alias = "TCOOFF")] OOff = c::TCOOFF, /// `TCOON`—Restart suspended output. + #[doc(alias = "TCOON")] OOn = c::TCOON, /// `TCIOFF`—Transmits a STOP byte. + #[doc(alias = "TCIOFF")] IOff = c::TCIOFF, /// `TCION`—Transmits a START byte. + #[doc(alias = "TCION")] IOn = c::TCION, } -/// `struct termios` for use with [`tcgetattr`]. +/// `struct termios` for use with [`tcgetattr`] and [`tcsetattr`]. /// /// [`tcgetattr`]: crate::termios::tcgetattr +/// [`tcsetattr`]: crate::termios::tcsetattr +#[doc(alias = "termios")] pub type Termios = c::termios; +/// `struct termios2` for use with [`tcgetattr2`] and [`tcsetattr2`]. +/// +/// [`tcgetattr2`]: crate::termios::tcgetattr2 +/// [`tcsetattr2`]: crate::termios::tcsetattr2 +#[cfg(all( + any(target_os = "android", target_os = "linux"), + any( + target_arch = "x86", + target_arch = "x86_64", + target_arch = "x32", + target_arch = "riscv64", + target_arch = "aarch64", + target_arch = "arm", + target_arch = "mips", + target_arch = "mips64", + ) +))] +#[doc(alias = "termios2")] +pub type Termios2 = c::termios2; + /// `struct winsize` for use with [`tcgetwinsize`]. /// /// [`tcgetwinsize`]: crate::termios::tcgetwinsize +#[doc(alias = "winsize")] pub type Winsize = c::winsize; /// `tcflag_t`—A type for the flags fields of [`Termios`]. +#[doc(alias = "tcflag_t")] pub type Tcflag = c::tcflag_t; /// `speed_t`—A return type for [`cfsetspeed`] and similar. /// /// [`cfsetspeed`]: crate::termios::cfsetspeed +#[doc(alias = "speed_t")] pub type Speed = c::speed_t; /// `VINTR` @@ -93,15 +128,14 @@ pub const VMIN: usize = c::VMIN as usize; /// `VSWTC` #[cfg(not(any( + apple, + solarish, + target_os = "aix", target_os = "dragonfly", target_os = "freebsd", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", target_os = "netbsd", target_os = "openbsd", - target_os = "solaris", )))] pub const VSWTC: usize = c::VSWTC as usize; @@ -122,11 +156,11 @@ pub const VEOL: usize = c::VEOL as usize; pub const VREPRINT: usize = c::VREPRINT as usize; /// `VDISCARD` -#[cfg(not(target_os = "haiku"))] +#[cfg(not(any(target_os = "aix", target_os = "haiku")))] pub const VDISCARD: usize = c::VDISCARD as usize; /// `VWERASE` -#[cfg(not(target_os = "haiku"))] +#[cfg(not(any(target_os = "aix", target_os = "haiku")))] pub const VWERASE: usize = c::VWERASE as usize; /// `VLNEXT` @@ -137,473 +171,276 @@ pub const VLNEXT: usize = c::VLNEXT as usize; pub const VEOL2: usize = c::VEOL2 as usize; /// `IGNBRK` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IGNBRK: c::c_uint = c::IGNBRK; /// `BRKINT` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const BRKINT: c::c_uint = c::BRKINT; /// `IGNPAR` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IGNPAR: c::c_uint = c::IGNPAR; /// `PARMRK` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const PARMRK: c::c_uint = c::PARMRK; /// `INPCK` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const INPCK: c::c_uint = c::INPCK; /// `ISTRIP` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ISTRIP: c::c_uint = c::ISTRIP; /// `INLCR` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const INLCR: c::c_uint = c::INLCR; /// `IGNCR` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IGNCR: c::c_uint = c::IGNCR; /// `ICRNL` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ICRNL: c::c_uint = c::ICRNL; /// `IUCLC` -#[cfg(any(target_os = "haiku", target_os = "illumos", target_os = "solaris"))] +#[cfg(any(solarish, target_os = "haiku"))] pub const IUCLC: c::c_uint = c::IUCLC; /// `IXON` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IXON: c::c_uint = c::IXON; /// `IXANY` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const IXANY: c::c_uint = c::IXANY; /// `IXOFF` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IXOFF: c::c_uint = c::IXOFF; /// `IMAXBEL` -#[cfg(not(any( - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "redox" -)))] +#[cfg(not(any(apple, target_os = "haiku", target_os = "redox")))] pub const IMAXBEL: c::c_uint = c::IMAXBEL; /// `IUTF8` #[cfg(not(any( + apple, + solarish, + target_os = "aix", target_os = "dragonfly", target_os = "emscripten", target_os = "freebsd", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", target_os = "netbsd", target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const IUTF8: c::c_uint = c::IUTF8; /// `OPOST` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const OPOST: c::c_uint = c::OPOST; /// `OLCUC` #[cfg(not(any( + apple, + target_os = "aix", target_os = "dragonfly", target_os = "freebsd", - target_os = "ios", - target_os = "macos", target_os = "netbsd", target_os = "redox", )))] pub const OLCUC: c::c_uint = c::OLCUC; /// `ONLCR` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ONLCR: c::c_uint = c::ONLCR; /// `OCRNL` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const OCRNL: c::c_uint = c::OCRNL; /// `ONOCR` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ONOCR: c::c_uint = c::ONOCR; /// `ONLRET` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ONLRET: c::c_uint = c::ONLRET; /// `OFILL` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", -)))] +#[cfg(not(bsd))] pub const OFILL: c::c_uint = c::OFILL; /// `OFDEL` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", -)))] +#[cfg(not(bsd))] pub const OFDEL: c::c_uint = c::OFDEL; /// `NLDLY` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "redox")))] pub const NLDLY: c::c_uint = c::NLDLY; /// `NL0` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const NL0: c::c_uint = c::NL0; /// `NL1` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const NL1: c::c_uint = c::NL1; /// `CRDLY` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "redox")))] pub const CRDLY: c::c_uint = c::CRDLY; /// `CR0` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const CR0: c::c_uint = c::CR0; /// `CR1` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const CR1: c::c_uint = c::CR1; /// `CR2` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const CR2: c::c_uint = c::CR2; /// `CR3` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const CR3: c::c_uint = c::CR3; /// `TABDLY` #[cfg(not(any( + apple, + netbsdlike, + solarish, target_os = "dragonfly", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "illumos", target_os = "redox", - target_os = "solaris", )))] pub const TABDLY: c::c_uint = c::TABDLY; /// `TAB0` #[cfg(not(any( + apple, + netbsdlike, + solarish, target_os = "dragonfly", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const TAB0: c::c_uint = c::TAB0; /// `TAB1` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const TAB1: c::c_uint = c::TAB1; /// `TAB2` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const TAB2: c::c_uint = c::TAB2; /// `TAB3` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const TAB3: c::c_uint = c::TAB3; /// `BSDLY` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "redox")))] pub const BSDLY: c::c_uint = c::BSDLY; /// `BS0` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const BS0: c::c_uint = c::BS0; /// `BS1` #[cfg(not(any( target_env = "musl", + bsd, + solarish, target_os = "emscripten", - target_os = "dragonfly", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const BS1: c::c_uint = c::BS1; /// `FFDLY` -#[cfg(not(any( - target_env = "musl", - target_os = "dragonfly", - target_os = "freebsd", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(target_env = "musl", bsd, solarish, target_os = "redox")))] pub const FFDLY: c::c_uint = c::FFDLY; /// `FF0` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const FF0: c::c_uint = c::FF0; /// `FF1` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const FF1: c::c_uint = c::FF1; /// `VTDLY` -#[cfg(not(any( - target_env = "musl", - target_os = "dragonfly", - target_os = "freebsd", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(target_env = "musl", bsd, solarish, target_os = "redox")))] pub const VTDLY: c::c_uint = c::VTDLY; /// `VT0` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] pub const VT0: c::c_uint = c::VT0; /// `VT1` #[cfg(not(any( target_env = "musl", - target_os = "dragonfly", + bsd, + solarish, target_os = "emscripten", - target_os = "freebsd", target_os = "fuchsia", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const VT1: c::c_uint = c::VT1; @@ -656,125 +493,68 @@ pub const B19200: Speed = c::B19200; pub const B38400: Speed = c::B38400; /// `B57600` +#[cfg(not(target_os = "aix"))] pub const B57600: Speed = c::B57600; /// `B115200` +#[cfg(not(target_os = "aix"))] pub const B115200: Speed = c::B115200; /// `B230400` +#[cfg(not(target_os = "aix"))] pub const B230400: Speed = c::B230400; /// `B460800` #[cfg(not(any( + apple, + target_os = "aix", target_os = "dragonfly", target_os = "haiku", - target_os = "ios", - target_os = "macos", target_os = "openbsd" )))] pub const B460800: Speed = c::B460800; /// `B500000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] pub const B500000: Speed = c::B500000; /// `B576000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] pub const B576000: Speed = c::B576000; /// `B921600` #[cfg(not(any( + apple, + target_os = "aix", target_os = "dragonfly", target_os = "haiku", - target_os = "ios", - target_os = "macos", target_os = "openbsd" )))] pub const B921600: Speed = c::B921600; /// `B1000000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] pub const B1000000: Speed = c::B1000000; /// `B1152000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] pub const B1152000: Speed = c::B1152000; /// `B1500000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] pub const B1500000: Speed = c::B1500000; /// `B2000000` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "solaris", -)))] +#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] pub const B2000000: Speed = c::B2000000; /// `B2500000` #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", - target_os = "dragonfly", - target_os = "freebsd", + bsd, + target_os = "aix", target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "solaris", )))] pub const B2500000: Speed = c::B2500000; @@ -783,13 +563,9 @@ pub const B2500000: Speed = c::B2500000; #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", - target_os = "dragonfly", - target_os = "freebsd", + bsd, + target_os = "aix", target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "solaris", )))] pub const B3000000: Speed = c::B3000000; @@ -798,13 +574,9 @@ pub const B3000000: Speed = c::B3000000; #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", - target_os = "dragonfly", - target_os = "freebsd", + bsd, + target_os = "aix", target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "solaris", )))] pub const B3500000: Speed = c::B3500000; @@ -813,63 +585,63 @@ pub const B3500000: Speed = c::B3500000; #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", - target_os = "dragonfly", - target_os = "freebsd", + bsd, + target_os = "aix", target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "solaris", )))] pub const B4000000: Speed = c::B4000000; +/// `BOTHER` +#[cfg(any(target_os = "android", target_os = "linux"))] +pub const BOTHER: c::c_uint = c::BOTHER; + /// `CSIZE` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CSIZE: c::c_uint = c::CSIZE; /// `CS5` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CS5: c::c_uint = c::CS5; /// `CS6` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CS6: c::c_uint = c::CS6; /// `CS7` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CS7: c::c_uint = c::CS7; /// `CS8` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CS8: c::c_uint = c::CS8; /// `CSTOPB` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CSTOPB: c::c_uint = c::CSTOPB; /// `CREAD` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CREAD: c::c_uint = c::CREAD; /// `PARENB` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const PARENB: c::c_uint = c::PARENB; /// `PARODD` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const PARODD: c::c_uint = c::PARODD; /// `HUPCL` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const HUPCL: c::c_uint = c::HUPCL; /// `CLOCAL` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const CLOCAL: c::c_uint = c::CLOCAL; /// `ISIG` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ISIG: c::c_uint = c::ISIG; /// `ICANON`—A flag for the `c_lflag` field of [`Termios`] indicating @@ -877,98 +649,75 @@ pub const ISIG: c::c_uint = c::ISIG; pub const ICANON: Tcflag = c::ICANON; /// `ECHO` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ECHO: c::c_uint = c::ECHO; /// `ECHOE` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ECHOE: c::c_uint = c::ECHOE; /// `ECHOK` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ECHOK: c::c_uint = c::ECHOK; /// `ECHONL` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const ECHONL: c::c_uint = c::ECHONL; /// `NOFLSH` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const NOFLSH: c::c_uint = c::NOFLSH; /// `TOSTOP` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const TOSTOP: c::c_uint = c::TOSTOP; /// `IEXTEN` -#[cfg(not(any(target_os = "ios", target_os = "macos")))] +#[cfg(not(apple))] pub const IEXTEN: c::c_uint = c::IEXTEN; /// `EXTA` #[cfg(not(any( + apple, + solarish, target_os = "emscripten", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", target_os = "redox", - target_os = "solaris", )))] pub const EXTA: c::c_uint = c::EXTA; /// `EXTB` #[cfg(not(any( + apple, + solarish, target_os = "emscripten", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", target_os = "redox", - target_os = "solaris", )))] pub const EXTB: c::c_uint = c::EXTB; /// `CBAUD` -#[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", - target_os = "redox", -)))] +#[cfg(not(any(bsd, target_os = "haiku", target_os = "redox")))] pub const CBAUD: c::c_uint = c::CBAUD; /// `CBAUDEX` #[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", + bsd, + solarish, + target_os = "aix", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const CBAUDEX: c::c_uint = c::CBAUDEX; /// `CIBAUD` #[cfg(not(any( - target_os = "dragonfly", + target_arch = "powerpc", + target_arch = "powerpc64", + bsd, target_os = "emscripten", - target_os = "freebsd", target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_arch = "powerpc", - target_arch = "powerpc64", )))] pub const CIBAUD: c::tcflag_t = c::CIBAUD; @@ -979,22 +728,17 @@ pub const CIBAUD: c::tcflag_t = 0o77600000; /// `CMSPAR` #[cfg(not(any( - target_os = "dragonfly", + bsd, + solarish, + target_os = "aix", target_os = "emscripten", - target_os = "freebsd", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const CMSPAR: c::c_uint = c::CMSPAR; /// `CRTSCTS` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "aix", target_os = "redox")))] pub const CRTSCTS: c::c_uint = c::CRTSCTS; /// `XCASE` @@ -1002,45 +746,35 @@ pub const CRTSCTS: c::c_uint = c::CRTSCTS; pub const XCASE: c::c_uint = c::XCASE; /// `ECHOCTL` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const ECHOCTL: c::c_uint = c::ECHOCTL; /// `ECHOPRT` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const ECHOPRT: c::c_uint = c::ECHOPRT; /// `ECHOKE` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const ECHOKE: c::c_uint = c::ECHOKE; /// `FLUSHO` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const FLUSHO: c::c_uint = c::FLUSHO; /// `PENDIN` -#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] +#[cfg(not(any(apple, target_os = "redox")))] pub const PENDIN: c::c_uint = c::PENDIN; /// `EXTPROC` -#[cfg(not(any( - target_os = "haiku", - target_os = "ios", - target_os = "macos", - target_os = "redox" -)))] +#[cfg(not(any(apple, target_os = "aix", target_os = "haiku", target_os = "redox")))] pub const EXTPROC: c::c_uint = c::EXTPROC; /// `XTABS` #[cfg(not(any( - target_os = "dragonfly", - target_os = "freebsd", + bsd, + solarish, + target_os = "aix", target_os = "haiku", - target_os = "illumos", - target_os = "ios", - target_os = "macos", - target_os = "netbsd", - target_os = "openbsd", target_os = "redox", - target_os = "solaris", )))] pub const XTABS: c::c_uint = c::XTABS; |