Skip to content

stty: extend cfg for discipline - #15605

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:stty-discipline
Open

oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:stty-discipline

Conversation

@oech3

@oech3 oech3 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

@xtqqczze

Copy link
Copy Markdown
Collaborator

Has compilation been checked locally on all affected targets?

@oech3

oech3 commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

No. I'll restrict this PR to android if I need to much care for minor targets missing from CI.

@xtqqczze

xtqqczze commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

Has compilation been checked locally on all affected targets?

I don't think it's too much an imposition to ask if the package can be compiled on affected targets. For the record, the changes compile successfully on fuchsia and haiku when rebased onto #15563:

$ RUSTC_BOOTSTRAP=1 cargo clippy -q -Zbuild-std=std \
  -p uu_stty --lib --all-features \
  --target x86_64-unknown-fuchsia \
  --target x86_64-unknown-haiku

@oech3

This comment was marked as outdated.

@oech3 oech3 closed this Oct 21, 2026
@oech3
oech3 deleted the stty-discipline branch October 21, 2026 18:36
@xtqqczze

Copy link
Copy Markdown
Collaborator

The changes seemed reasonable, I don't understand why the PR was closed.

@oech3
oech3 restored the stty-discipline branch October 21, 2026 18:53
@oech3 oech3 reopened this Oct 21, 2026
@oech3

oech3 commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

But haiku will be broken by rustix soon due to SpecialCodes? I don't want to stop development just for the target.

@xtqqczze

Copy link
Copy Markdown
Collaborator

These changes compile on haiku, so there’s no issue for now. If a future change breaks haiku and is otherwise justified, support for that target can be disabled via cfg.

@oech3

oech3 commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor Author

I missed it was still nix.

// nix only defines Termios's `line_discipline` field on these platforms
#[cfg(any(target_os = "linux", target_os = "android"))]
{
_termios.line_discipline = *n;
}

Comment thread src/uu/stty/src/stty.rs
target_os = "haiku",
target_os = "linux",
target_os = "redox"
))]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please use the same cfg list in apply_special_setting for line N? it is still linux/android only there (and the comment still says nix)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it is actually using nix. We need to switch to rustix at 1st.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants