Skip to content

Commit

Permalink
termios: enabling supported SpecialCharacterIndices on haiku.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Nov 19, 2023
1 parent 6bacfe0 commit cc3d658
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/sys/termios.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,13 +512,12 @@ libc_enum! {
}

// TODO: Make this usable directly as a slice index.
#[cfg(not(target_os = "haiku"))]
libc_enum! {
/// Indices into the `termios.c_cc` array for special characters.
#[repr(usize)]
#[non_exhaustive]
pub enum SpecialCharacterIndices {
#[cfg(not(target_os = "aix"))]
#[cfg(not(any(target_os = "aix", target_os = "haiku")))]
VDISCARD,
#[cfg(any(target_os = "dragonfly",
target_os = "freebsd",
Expand All @@ -540,11 +539,13 @@ libc_enum! {
VERASE2,
VINTR,
VKILL,
#[cfg(not(target_os = "haiku"))]
VLNEXT,
#[cfg(not(any(all(target_os = "linux", target_arch = "sparc64"),
target_os = "illumos", target_os = "solaris", target_os = "aix")))]
target_os = "illumos", target_os = "solaris", target_os = "aix", target_os = "haiku")))]
VMIN,
VQUIT,
#[cfg(not(target_os = "haiku"))]
VREPRINT,
VSTART,
#[cfg(any(target_os = "dragonfly",
Expand All @@ -562,9 +563,9 @@ libc_enum! {
#[cfg(any(target_os = "haiku", target_os = "illumos", target_os = "solaris"))]
VSWTCH,
#[cfg(not(any(all(target_os = "linux", target_arch = "sparc64"),
target_os = "illumos", target_os = "solaris", target_os = "aix")))]
target_os = "illumos", target_os = "solaris", target_os = "aix", target_os = "haiku")))]
VTIME,
#[cfg(not(target_os = "aix"))]
#[cfg(not(any(target_os = "aix", target_os = "haiku")))]
VWERASE,
#[cfg(target_os = "dragonfly")]
VCHECKPT,
Expand All @@ -576,6 +577,7 @@ libc_enum! {
target_os = "illumos",
target_os = "solaris",
target_os = "aix",
target_os = "haiku",
))]
impl SpecialCharacterIndices {
pub const VMIN: SpecialCharacterIndices = SpecialCharacterIndices::VEOF;
Expand Down

0 comments on commit cc3d658

Please sign in to comment.