From ef24de24a82fe681581cc130f342363c47c0969a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 7 Jun 2024 07:48:48 +0200 Subject: Merging upstream version 1.75.0+dfsg1. Signed-off-by: Daniel Baumann --- .../rustix-0.37.6/src/backend/libc/termios/mod.rs | 3 - .../src/backend/libc/termios/syscalls.rs | 211 ------ .../src/backend/libc/termios/types.rs | 780 --------------------- 3 files changed, 994 deletions(-) delete mode 100644 vendor/rustix-0.37.6/src/backend/libc/termios/mod.rs delete mode 100644 vendor/rustix-0.37.6/src/backend/libc/termios/syscalls.rs delete mode 100644 vendor/rustix-0.37.6/src/backend/libc/termios/types.rs (limited to 'vendor/rustix-0.37.6/src/backend/libc/termios') diff --git a/vendor/rustix-0.37.6/src/backend/libc/termios/mod.rs b/vendor/rustix-0.37.6/src/backend/libc/termios/mod.rs deleted file mode 100644 index c82c95958..000000000 --- a/vendor/rustix-0.37.6/src/backend/libc/termios/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub(crate) mod syscalls; -#[cfg(not(target_os = "wasi"))] -pub(crate) mod types; diff --git a/vendor/rustix-0.37.6/src/backend/libc/termios/syscalls.rs b/vendor/rustix-0.37.6/src/backend/libc/termios/syscalls.rs deleted file mode 100644 index 097d368ed..000000000 --- a/vendor/rustix-0.37.6/src/backend/libc/termios/syscalls.rs +++ /dev/null @@ -1,211 +0,0 @@ -//! libc syscalls supporting `rustix::termios`. -//! -//! # Safety -//! -//! See the `rustix::backend::syscalls` module documentation for details. - -use super::super::c; -use super::super::conv::{borrowed_fd, ret, ret_pid_t}; -use crate::fd::BorrowedFd; -#[cfg(feature = "procfs")] -#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] -use crate::ffi::CStr; -#[cfg(not(target_os = "wasi"))] -use crate::io; -#[cfg(not(target_os = "wasi"))] -use crate::process::{Pid, RawNonZeroPid}; -#[cfg(not(target_os = "wasi"))] -use crate::termios::{Action, OptionalActions, QueueSelector, Speed, Termios, Winsize}; -use core::mem::MaybeUninit; - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcgetattr(fd: BorrowedFd<'_>) -> io::Result { - let mut result = MaybeUninit::::uninit(); - unsafe { - ret(c::tcgetattr(borrowed_fd(fd), result.as_mut_ptr()))?; - Ok(result.assume_init()) - } -} - -#[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 { - let mut result = MaybeUninit::::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 { - unsafe { - let pid = ret_pid_t(c::tcgetpgrp(borrowed_fd(fd)))?; - debug_assert_ne!(pid, 0); - Ok(Pid::from_raw_nonzero(RawNonZeroPid::new_unchecked(pid))) - } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcsetpgrp(fd: BorrowedFd<'_>, pid: Pid) -> io::Result<()> { - unsafe { ret(c::tcsetpgrp(borrowed_fd(fd), pid.as_raw_nonzero().get())) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcsetattr( - fd: BorrowedFd, - optional_actions: OptionalActions, - termios: &Termios, -) -> io::Result<()> { - unsafe { - ret(c::tcsetattr( - borrowed_fd(fd), - optional_actions as _, - 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 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)) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcdrain(fd: BorrowedFd) -> io::Result<()> { - unsafe { ret(c::tcdrain(borrowed_fd(fd))) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcflush(fd: BorrowedFd, queue_selector: QueueSelector) -> io::Result<()> { - unsafe { ret(c::tcflush(borrowed_fd(fd), queue_selector as _)) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcflow(fd: BorrowedFd, action: Action) -> io::Result<()> { - unsafe { ret(c::tcflow(borrowed_fd(fd), action as _)) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcgetsid(fd: BorrowedFd) -> io::Result { - unsafe { - let pid = ret_pid_t(c::tcgetsid(borrowed_fd(fd)))?; - debug_assert_ne!(pid, 0); - Ok(Pid::from_raw_nonzero(RawNonZeroPid::new_unchecked(pid))) - } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcsetwinsize(fd: BorrowedFd, winsize: Winsize) -> io::Result<()> { - unsafe { ret(c::ioctl(borrowed_fd(fd), c::TIOCSWINSZ, &winsize)) } -} - -#[cfg(not(target_os = "wasi"))] -pub(crate) fn tcgetwinsize(fd: BorrowedFd) -> io::Result { - unsafe { - let mut buf = MaybeUninit::::uninit(); - ret(c::ioctl( - borrowed_fd(fd), - c::TIOCGWINSZ.into(), - buf.as_mut_ptr(), - ))?; - Ok(buf.assume_init()) - } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -#[must_use] -pub(crate) fn cfgetospeed(termios: &Termios) -> Speed { - unsafe { c::cfgetospeed(termios) } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -#[must_use] -pub(crate) fn cfgetispeed(termios: &Termios) -> Speed { - unsafe { c::cfgetispeed(termios) } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -pub(crate) fn cfmakeraw(termios: &mut Termios) { - unsafe { c::cfmakeraw(termios) } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -pub(crate) fn cfsetospeed(termios: &mut Termios, speed: Speed) -> io::Result<()> { - unsafe { ret(c::cfsetospeed(termios, speed)) } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -pub(crate) fn cfsetispeed(termios: &mut Termios, speed: Speed) -> io::Result<()> { - unsafe { ret(c::cfsetispeed(termios, speed)) } -} - -#[cfg(not(target_os = "wasi"))] -#[inline] -pub(crate) fn cfsetspeed(termios: &mut Termios, speed: Speed) -> io::Result<()> { - unsafe { ret(c::cfsetspeed(termios, speed)) } -} - -pub(crate) fn isatty(fd: BorrowedFd<'_>) -> bool { - // Use the return value of `isatty` alone. We don't check `errno` because - // we return `bool` rather than `io::Result`, because we assume - // `BorrrowedFd` protects us from `EBADF`, and any other reasonably - // anticipated errno value would end up interpreted as "assume it's not a - // terminal" anyway. - unsafe { c::isatty(borrowed_fd(fd)) != 0 } -} - -#[cfg(feature = "procfs")] -#[cfg(not(any(target_os = "fuchsia", target_os = "wasi")))] -pub(crate) fn ttyname(dirfd: BorrowedFd<'_>, buf: &mut [u8]) -> io::Result { - unsafe { - // `ttyname_r` returns its error status rather than using `errno`. - match c::ttyname_r(borrowed_fd(dirfd), buf.as_mut_ptr().cast(), buf.len()) { - 0 => Ok(CStr::from_ptr(buf.as_ptr().cast()).to_bytes().len()), - err => Err(io::Errno::from_raw_os_error(err)), - } - } -} diff --git a/vendor/rustix-0.37.6/src/backend/libc/termios/types.rs b/vendor/rustix-0.37.6/src/backend/libc/termios/types.rs deleted file mode 100644 index bbacdbea0..000000000 --- a/vendor/rustix-0.37.6/src/backend/libc/termios/types.rs +++ /dev/null @@ -1,780 +0,0 @@ -use super::super::c; - -/// `TCSA*` values for use with [`tcsetattr`]. -/// -/// [`tcsetattr`]: crate::termios::tcsetattr -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] -#[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, -} - -/// `TC*` values for use with [`tcflush`]. -/// -/// [`tcflush`]: crate::termios::tcflush -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] -#[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, -} - -/// `TC*` values for use with [`tcflow`]. -/// -/// [`tcflow`]: crate::termios::tcflow -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] -#[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`] 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` -pub const VINTR: usize = c::VINTR as usize; - -/// `VQUIT` -pub const VQUIT: usize = c::VQUIT as usize; - -/// `VERASE` -pub const VERASE: usize = c::VERASE as usize; - -/// `VKILL` -pub const VKILL: usize = c::VKILL as usize; - -/// `VEOF` -pub const VEOF: usize = c::VEOF as usize; - -/// `VTIME` -pub const VTIME: usize = c::VTIME as usize; - -/// `VMIN` -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 = "netbsd", - target_os = "openbsd", -)))] -pub const VSWTC: usize = c::VSWTC as usize; - -/// `VSTART` -pub const VSTART: usize = c::VSTART as usize; - -/// `VSTOP` -pub const VSTOP: usize = c::VSTOP as usize; - -/// `VSUSP` -pub const VSUSP: usize = c::VSUSP as usize; - -/// `VEOL` -pub const VEOL: usize = c::VEOL as usize; - -/// `VREPRINT` -#[cfg(not(target_os = "haiku"))] -pub const VREPRINT: usize = c::VREPRINT as usize; - -/// `VDISCARD` -#[cfg(not(any(target_os = "aix", target_os = "haiku")))] -pub const VDISCARD: usize = c::VDISCARD as usize; - -/// `VWERASE` -#[cfg(not(any(target_os = "aix", target_os = "haiku")))] -pub const VWERASE: usize = c::VWERASE as usize; - -/// `VLNEXT` -#[cfg(not(target_os = "haiku"))] -pub const VLNEXT: usize = c::VLNEXT as usize; - -/// `VEOL2` -pub const VEOL2: usize = c::VEOL2 as usize; - -/// `IGNBRK` -#[cfg(not(apple))] -pub const IGNBRK: c::c_uint = c::IGNBRK; - -/// `BRKINT` -#[cfg(not(apple))] -pub const BRKINT: c::c_uint = c::BRKINT; - -/// `IGNPAR` -#[cfg(not(apple))] -pub const IGNPAR: c::c_uint = c::IGNPAR; - -/// `PARMRK` -#[cfg(not(apple))] -pub const PARMRK: c::c_uint = c::PARMRK; - -/// `INPCK` -#[cfg(not(apple))] -pub const INPCK: c::c_uint = c::INPCK; - -/// `ISTRIP` -#[cfg(not(apple))] -pub const ISTRIP: c::c_uint = c::ISTRIP; - -/// `INLCR` -#[cfg(not(apple))] -pub const INLCR: c::c_uint = c::INLCR; - -/// `IGNCR` -#[cfg(not(apple))] -pub const IGNCR: c::c_uint = c::IGNCR; - -/// `ICRNL` -#[cfg(not(apple))] -pub const ICRNL: c::c_uint = c::ICRNL; - -/// `IUCLC` -#[cfg(any(solarish, target_os = "haiku"))] -pub const IUCLC: c::c_uint = c::IUCLC; - -/// `IXON` -#[cfg(not(apple))] -pub const IXON: c::c_uint = c::IXON; - -/// `IXANY` -#[cfg(not(any(apple, target_os = "redox")))] -pub const IXANY: c::c_uint = c::IXANY; - -/// `IXOFF` -#[cfg(not(apple))] -pub const IXOFF: c::c_uint = c::IXOFF; - -/// `IMAXBEL` -#[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 = "netbsd", - target_os = "openbsd", - target_os = "redox", -)))] -pub const IUTF8: c::c_uint = c::IUTF8; - -/// `OPOST` -#[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 = "netbsd", - target_os = "redox", -)))] -pub const OLCUC: c::c_uint = c::OLCUC; - -/// `ONLCR` -#[cfg(not(apple))] -pub const ONLCR: c::c_uint = c::ONLCR; - -/// `OCRNL` -#[cfg(not(apple))] -pub const OCRNL: c::c_uint = c::OCRNL; - -/// `ONOCR` -#[cfg(not(apple))] -pub const ONOCR: c::c_uint = c::ONOCR; - -/// `ONLRET` -#[cfg(not(apple))] -pub const ONLRET: c::c_uint = c::ONLRET; - -/// `OFILL` -#[cfg(not(bsd))] -pub const OFILL: c::c_uint = c::OFILL; - -/// `OFDEL` -#[cfg(not(bsd))] -pub const OFDEL: c::c_uint = c::OFDEL; - -/// `NLDLY` -#[cfg(not(any(bsd, solarish, target_os = "redox")))] -pub const NLDLY: c::c_uint = c::NLDLY; - -/// `NL0` -#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] -pub const NL0: c::c_uint = c::NL0; - -/// `NL1` -#[cfg(not(any(bsd, solarish, target_os = "fuchsia", target_os = "redox")))] -pub const NL1: c::c_uint = c::NL1; - -/// `CRDLY` -#[cfg(not(any(bsd, solarish, target_os = "redox")))] -pub const CRDLY: c::c_uint = c::CRDLY; - -/// `CR0` -#[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", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const CR1: c::c_uint = c::CR1; - -/// `CR2` -#[cfg(not(any( - target_env = "musl", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const CR2: c::c_uint = c::CR2; - -/// `CR3` -#[cfg(not(any( - target_env = "musl", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const CR3: c::c_uint = c::CR3; - -/// `TABDLY` -#[cfg(not(any( - apple, - netbsdlike, - solarish, - target_os = "dragonfly", - target_os = "redox", -)))] -pub const TABDLY: c::c_uint = c::TABDLY; - -/// `TAB0` -#[cfg(not(any( - apple, - netbsdlike, - solarish, - target_os = "dragonfly", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const TAB0: c::c_uint = c::TAB0; - -/// `TAB1` -#[cfg(not(any( - target_env = "musl", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const TAB1: c::c_uint = c::TAB1; - -/// `TAB2` -#[cfg(not(any( - target_env = "musl", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const TAB2: c::c_uint = c::TAB2; - -/// `TAB3` -#[cfg(not(any( - target_env = "musl", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const TAB3: c::c_uint = c::TAB3; - -/// `BSDLY` -#[cfg(not(any(bsd, solarish, target_os = "redox")))] -pub const BSDLY: c::c_uint = c::BSDLY; - -/// `BS0` -#[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 = "fuchsia", - target_os = "redox", -)))] -pub const BS1: c::c_uint = c::BS1; - -/// `FFDLY` -#[cfg(not(any(target_env = "musl", bsd, solarish, target_os = "redox")))] -pub const FFDLY: c::c_uint = c::FFDLY; - -/// `FF0` -#[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", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const FF1: c::c_uint = c::FF1; - -/// `VTDLY` -#[cfg(not(any(target_env = "musl", bsd, solarish, target_os = "redox")))] -pub const VTDLY: c::c_uint = c::VTDLY; - -/// `VT0` -#[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", - bsd, - solarish, - target_os = "emscripten", - target_os = "fuchsia", - target_os = "redox", -)))] -pub const VT1: c::c_uint = c::VT1; - -/// `B0` -pub const B0: Speed = c::B0; - -/// `B50` -pub const B50: Speed = c::B50; - -/// `B75` -pub const B75: Speed = c::B75; - -/// `B110` -pub const B110: Speed = c::B110; - -/// `B134` -pub const B134: Speed = c::B134; - -/// `B150` -pub const B150: Speed = c::B150; - -/// `B200` -pub const B200: Speed = c::B200; - -/// `B300` -pub const B300: Speed = c::B300; - -/// `B600` -pub const B600: Speed = c::B600; - -/// `B1200` -pub const B1200: Speed = c::B1200; - -/// `B1800` -pub const B1800: Speed = c::B1800; - -/// `B2400` -pub const B2400: Speed = c::B2400; - -/// `B4800` -pub const B4800: Speed = c::B4800; - -/// `B9600` -pub const B9600: Speed = c::B9600; - -/// `B19200` -pub const B19200: Speed = c::B19200; - -/// `B38400` -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 = "openbsd" -)))] -pub const B460800: Speed = c::B460800; - -/// `B500000` -#[cfg(not(any(bsd, solarish, target_os = "aix", target_os = "haiku")))] -pub const B500000: Speed = c::B500000; - -/// `B576000` -#[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 = "openbsd" -)))] -pub const B921600: Speed = c::B921600; - -/// `B1000000` -#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] -pub const B1000000: Speed = c::B1000000; - -/// `B1152000` -#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] -pub const B1152000: Speed = c::B1152000; - -/// `B1500000` -#[cfg(not(any(bsd, target_os = "aix", target_os = "haiku", target_os = "solaris")))] -pub const B1500000: Speed = c::B1500000; - -/// `B2000000` -#[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", - bsd, - target_os = "aix", - target_os = "haiku", - target_os = "solaris", -)))] -pub const B2500000: Speed = c::B2500000; - -/// `B3000000` -#[cfg(not(any( - target_arch = "sparc", - target_arch = "sparc64", - bsd, - target_os = "aix", - target_os = "haiku", - target_os = "solaris", -)))] -pub const B3000000: Speed = c::B3000000; - -/// `B3500000` -#[cfg(not(any( - target_arch = "sparc", - target_arch = "sparc64", - bsd, - target_os = "aix", - target_os = "haiku", - target_os = "solaris", -)))] -pub const B3500000: Speed = c::B3500000; - -/// `B4000000` -#[cfg(not(any( - target_arch = "sparc", - target_arch = "sparc64", - bsd, - target_os = "aix", - target_os = "haiku", - 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(apple))] -pub const CSIZE: c::c_uint = c::CSIZE; - -/// `CS5` -#[cfg(not(apple))] -pub const CS5: c::c_uint = c::CS5; - -/// `CS6` -#[cfg(not(apple))] -pub const CS6: c::c_uint = c::CS6; - -/// `CS7` -#[cfg(not(apple))] -pub const CS7: c::c_uint = c::CS7; - -/// `CS8` -#[cfg(not(apple))] -pub const CS8: c::c_uint = c::CS8; - -/// `CSTOPB` -#[cfg(not(apple))] -pub const CSTOPB: c::c_uint = c::CSTOPB; - -/// `CREAD` -#[cfg(not(apple))] -pub const CREAD: c::c_uint = c::CREAD; - -/// `PARENB` -#[cfg(not(apple))] -pub const PARENB: c::c_uint = c::PARENB; - -/// `PARODD` -#[cfg(not(apple))] -pub const PARODD: c::c_uint = c::PARODD; - -/// `HUPCL` -#[cfg(not(apple))] -pub const HUPCL: c::c_uint = c::HUPCL; - -/// `CLOCAL` -#[cfg(not(apple))] -pub const CLOCAL: c::c_uint = c::CLOCAL; - -/// `ISIG` -#[cfg(not(apple))] -pub const ISIG: c::c_uint = c::ISIG; - -/// `ICANON`—A flag for the `c_lflag` field of [`Termios`] indicating -/// canonical mode. -pub const ICANON: Tcflag = c::ICANON; - -/// `ECHO` -#[cfg(not(apple))] -pub const ECHO: c::c_uint = c::ECHO; - -/// `ECHOE` -#[cfg(not(apple))] -pub const ECHOE: c::c_uint = c::ECHOE; - -/// `ECHOK` -#[cfg(not(apple))] -pub const ECHOK: c::c_uint = c::ECHOK; - -/// `ECHONL` -#[cfg(not(apple))] -pub const ECHONL: c::c_uint = c::ECHONL; - -/// `NOFLSH` -#[cfg(not(apple))] -pub const NOFLSH: c::c_uint = c::NOFLSH; - -/// `TOSTOP` -#[cfg(not(apple))] -pub const TOSTOP: c::c_uint = c::TOSTOP; - -/// `IEXTEN` -#[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 = "redox", -)))] -pub const EXTA: c::c_uint = c::EXTA; - -/// `EXTB` -#[cfg(not(any( - apple, - solarish, - target_os = "emscripten", - target_os = "haiku", - target_os = "redox", -)))] -pub const EXTB: c::c_uint = c::EXTB; - -/// `CBAUD` -#[cfg(not(any(bsd, target_os = "haiku", target_os = "redox")))] -pub const CBAUD: c::c_uint = c::CBAUD; - -/// `CBAUDEX` -#[cfg(not(any( - bsd, - solarish, - target_os = "aix", - target_os = "haiku", - target_os = "redox", -)))] -pub const CBAUDEX: c::c_uint = c::CBAUDEX; - -/// `CIBAUD` -#[cfg(not(any( - target_arch = "powerpc", - target_arch = "powerpc64", - bsd, - target_os = "emscripten", - target_os = "haiku", - target_os = "redox", -)))] -pub const CIBAUD: c::tcflag_t = c::CIBAUD; - -/// `CIBAUD` -// TODO: Upstream this. -#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))] -pub const CIBAUD: c::tcflag_t = 0o77600000; - -/// `CMSPAR` -#[cfg(not(any( - bsd, - solarish, - target_os = "aix", - target_os = "emscripten", - target_os = "haiku", - target_os = "redox", -)))] -pub const CMSPAR: c::c_uint = c::CMSPAR; - -/// `CRTSCTS` -#[cfg(not(any(apple, target_os = "aix", target_os = "redox")))] -pub const CRTSCTS: c::c_uint = c::CRTSCTS; - -/// `XCASE` -#[cfg(any(target_arch = "s390x", target_os = "haiku"))] -pub const XCASE: c::c_uint = c::XCASE; - -/// `ECHOCTL` -#[cfg(not(any(apple, target_os = "redox")))] -pub const ECHOCTL: c::c_uint = c::ECHOCTL; - -/// `ECHOPRT` -#[cfg(not(any(apple, target_os = "redox")))] -pub const ECHOPRT: c::c_uint = c::ECHOPRT; - -/// `ECHOKE` -#[cfg(not(any(apple, target_os = "redox")))] -pub const ECHOKE: c::c_uint = c::ECHOKE; - -/// `FLUSHO` -#[cfg(not(any(apple, target_os = "redox")))] -pub const FLUSHO: c::c_uint = c::FLUSHO; - -/// `PENDIN` -#[cfg(not(any(apple, target_os = "redox")))] -pub const PENDIN: c::c_uint = c::PENDIN; - -/// `EXTPROC` -#[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( - bsd, - solarish, - target_os = "aix", - target_os = "haiku", - target_os = "redox", -)))] -pub const XTABS: c::c_uint = c::XTABS; -- cgit v1.2.3