Skip to content

Commit dbdcfed

Browse files
authored
termios: enabling supported SpecialCharacterIndices on haiku. (#2195)
* termios: enabling supported SpecialCharacterIndices on haiku. * changelog entry
1 parent 6f39686 commit dbdcfed

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

changelog/2195.added.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added `SpecialCharacterindices` support for haiku.

src/sys/termios.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,13 +512,12 @@ libc_enum! {
512512
}
513513

514514
// TODO: Make this usable directly as a slice index.
515-
#[cfg(not(target_os = "haiku"))]
516515
libc_enum! {
517516
/// Indices into the `termios.c_cc` array for special characters.
518517
#[repr(usize)]
519518
#[non_exhaustive]
520519
pub enum SpecialCharacterIndices {
521-
#[cfg(not(target_os = "aix"))]
520+
#[cfg(not(any(target_os = "aix", target_os = "haiku")))]
522521
VDISCARD,
523522
#[cfg(any(target_os = "dragonfly",
524523
target_os = "freebsd",
@@ -540,11 +539,13 @@ libc_enum! {
540539
VERASE2,
541540
VINTR,
542541
VKILL,
542+
#[cfg(not(target_os = "haiku"))]
543543
VLNEXT,
544544
#[cfg(not(any(all(target_os = "linux", target_arch = "sparc64"),
545-
target_os = "illumos", target_os = "solaris", target_os = "aix")))]
545+
target_os = "illumos", target_os = "solaris", target_os = "aix", target_os = "haiku")))]
546546
VMIN,
547547
VQUIT,
548+
#[cfg(not(target_os = "haiku"))]
548549
VREPRINT,
549550
VSTART,
550551
#[cfg(any(target_os = "dragonfly",
@@ -562,9 +563,9 @@ libc_enum! {
562563
#[cfg(any(target_os = "haiku", target_os = "illumos", target_os = "solaris"))]
563564
VSWTCH,
564565
#[cfg(not(any(all(target_os = "linux", target_arch = "sparc64"),
565-
target_os = "illumos", target_os = "solaris", target_os = "aix")))]
566+
target_os = "illumos", target_os = "solaris", target_os = "aix", target_os = "haiku")))]
566567
VTIME,
567-
#[cfg(not(target_os = "aix"))]
568+
#[cfg(not(any(target_os = "aix", target_os = "haiku")))]
568569
VWERASE,
569570
#[cfg(target_os = "dragonfly")]
570571
VCHECKPT,
@@ -576,6 +577,7 @@ libc_enum! {
576577
target_os = "illumos",
577578
target_os = "solaris",
578579
target_os = "aix",
580+
target_os = "haiku",
579581
))]
580582
impl SpecialCharacterIndices {
581583
pub const VMIN: SpecialCharacterIndices = SpecialCharacterIndices::VEOF;

0 commit comments

Comments
 (0)