Skip to content

Commit

Permalink
termios: enabling supported SpecialCharacterIndices on haiku. (#2195)
Browse files Browse the repository at this point in the history
* termios: enabling supported SpecialCharacterIndices on haiku.

* changelog entry
  • Loading branch information
devnexen committed Nov 19, 2023
1 parent 6f39686 commit dbdcfed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog/2195.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added `SpecialCharacterindices` support for haiku.
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 dbdcfed

Please sign in to comment.