diff --git a/src/uu/ls/src/display.rs b/src/uu/ls/src/display.rs index 74180ea1e5e..a0b0b2eeb8f 100644 --- a/src/uu/ls/src/display.rs +++ b/src/uu/ls/src/display.rs @@ -37,15 +37,14 @@ use uucore::entries; use uucore::fsxattr::has_acl; #[cfg(any( target_os = "linux", - target_os = "macos", target_os = "android", - target_os = "ios", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd", target_os = "illumos", - target_os = "solaris" + target_os = "solaris", + target_vendor = "apple" ))] use uucore::libc::{dev_t, major, minor}; use uucore::{ @@ -630,15 +629,14 @@ fn display_date( fn display_len_or_rdev(metadata: &Metadata, config: &Config) -> SizeOrDeviceId { #[cfg(any( target_os = "linux", - target_os = "macos", target_os = "android", - target_os = "ios", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd", target_os = "illumos", - target_os = "solaris" + target_os = "solaris", + target_vendor = "apple" ))] { let ft = metadata.file_type(); diff --git a/src/uu/stty/build.rs b/src/uu/stty/build.rs index e8cce5884ad..a588c58a720 100644 --- a/src/uu/stty/build.rs +++ b/src/uu/stty/build.rs @@ -10,10 +10,9 @@ fn main() { bsd: { any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" ) }, } } diff --git a/src/uu/stty/src/flags.rs b/src/uu/stty/src/flags.rs index 9fd3f3d757a..ce60097831f 100644 --- a/src/uu/stty/src/flags.rs +++ b/src/uu/stty/src/flags.rs @@ -97,137 +97,120 @@ pub const OUTPUT_FLAGS: &[Flag] = &[ #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new("ofdel", O::OFDEL), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("nl0", O::NL0, O::NLDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("nl1", O::NL1, O::NLDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("cr0", O::CR0, O::CRDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("cr1", O::CR1, O::CRDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("cr2", O::CR2, O::CRDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("cr3", O::CR3, O::CRDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("tab0", O::TAB0, O::TABDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("tab1", O::TAB1, O::TABDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("tab2", O::TAB2, O::TABDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("tab3", O::TAB3, O::TABDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("bs0", O::BS0, O::BSDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("bs1", O::BS1, O::BSDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("vt0", O::VT0, O::VTDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("vt1", O::VT1, O::VTDLY), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("ff0", O::FF0, O::FFDLY).sane(), #[cfg(any( target_os = "android", target_os = "haiku", - target_os = "ios", target_os = "linux", - target_os = "macos" + target_vendor = "apple" ))] Flag::new_grouped("ff1", O::FF1, O::FFDLY), ]; diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index 3372741a867..307038ee099 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -478,7 +478,7 @@ fn test_ls_devices() { at.mkdir("some-dir1"); // Regex tests correct device ID and correct (no pad) spacing for a single file - #[cfg(any(target_os = "macos", target_os = "ios"))] + #[cfg(target_vendor = "apple")] { scene .ucmd() @@ -5056,14 +5056,13 @@ fn test_tabsize_formatting() { #[cfg(any( target_os = "linux", - target_os = "macos", - target_os = "ios", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd", target_os = "illumos", - target_os = "solaris" + target_os = "solaris", + target_vendor = "apple" ))] #[test] fn test_device_number() { diff --git a/tests/by-util/test_stty.rs b/tests/by-util/test_stty.rs index 79f9c12839b..411c716cab0 100644 --- a/tests/by-util/test_stty.rs +++ b/tests/by-util/test_stty.rs @@ -156,10 +156,9 @@ fn invalid_baud_setting() { #[cfg(not(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" )))] new_ucmd!() .args(&["100"]) @@ -184,10 +183,9 @@ fn invalid_baud_setting() { #[cfg(not(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" )))] new_ucmd!() .args(&["ispeed", "995"]) @@ -197,10 +195,9 @@ fn invalid_baud_setting() { #[cfg(not(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" )))] new_ucmd!() .args(&["ospeed", "995"]) @@ -479,10 +476,9 @@ fn baud_rate_validation() { #[cfg(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" ))] { // BSD accepts numeric baud rates @@ -1495,10 +1491,9 @@ fn invalid_baud_rate() { #[cfg(not(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" )))] { new_ucmd!() @@ -1661,10 +1656,9 @@ fn test_ispeed_ospeed_valid_speeds() { not(any( target_os = "freebsd", target_os = "dragonfly", - target_os = "ios", - target_os = "macos", target_os = "netbsd", - target_os = "openbsd" + target_os = "openbsd", + target_vendor = "apple" )) ))] #[ignore = "Issue: #9547"]