Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/uu/ls/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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();
Expand Down
5 changes: 2 additions & 3 deletions src/uu/stty/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
) },
}
}
51 changes: 17 additions & 34 deletions src/uu/stty/src/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,137 +97,120 @@ pub const OUTPUT_FLAGS: &[Flag<O>] = &[
#[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),
];
Expand Down
7 changes: 3 additions & 4 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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() {
Expand Down
30 changes: 12 additions & 18 deletions tests/by-util/test_stty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand All @@ -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"])
Expand All @@ -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"])
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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!()
Expand Down Expand Up @@ -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"]
Expand Down
Loading