Repository navigation
Conversation
|
I don't like diff given by |
$ rustc --print host-tuple
aarch64-apple-darwin
$ cargo run -q --features unix stty --allDiff from this change: @@ -5,6 +5,6 @@ discard = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -ixoff -tandem
ixon ixany imaxbel iutf8
-opost -ocrnl onlcr -onocr -onlret -ofdel nl0 cr0 tab0 bs0 vt0 ff0
+opost -ocrnl onlcr -onocr -onlret
isig icanon iexten echo echoe echok -echonl -noflsh -tostop -echoprt echoctl
echoke -flusho -extproc |
|
@collinfunk GNU stty output includes
|
|
I think kernel should reject them with |
|
This is probably why |
|
These are all flags required by POSIX, so I'm not sure we should exclude them even Apple does not implement them: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html |
This comment was marked as outdated.
This comment was marked as outdated.
|
I think we can drop them if they are bottom of struct. |
|
One of an another reason for removing them is compatibility with |
|
It seems macOS stty does not error with flags such as $ stty ofdel
$ stty nl0
$ stty cr0
$ stty tab0
$ stty bs0
$ stty vt0
$ stty ff0
$ stty olcuc
stty: illegal option -- olcuc
usage: stty [-a | -e | -g] [-f file] [arguments]So I think we should not make this change. |
|
@oech3 Should nix-rust/nix#2846 be closed? |
|
Sure |
|
@oech3 For bytecodealliance/rustix#1706, does |
|
I think we can edit issue title to request unimplemented flags. But I think usecase is too nich to request. |
|
Which specific flags are unimplemented in |
|
Same with flags this PR tried to drop? |
|
Oh... |
|
Do we need to support unimplemented flags also on other BSDs? |
So your claim is
|
|
Yes. |
|
Sorry. TAB0 is given. |
If they are POSIX I would think so. https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html |
|
I've addressed the missing flags for Apple targets upstream in bytecodealliance/rustix#1709. |
Since they are not implemented in |
|
On FreeBSD CI: Failed to do same things on OpenBSD. |
|
So there is no issue for other BSD? |
|
On NetBSD |
|
My bad. Would you try |
|
On OpenBSD current/amd64, with GNU coreutils installed via $ gstty --all
speed 115200 baud; rows 67; columns 273;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; dsusp = ^Y; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; status = <undef>; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret tab0
isig icanon iexten echo echoe -echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc |
Sure ... I had to build it because, I usually don't have it installed. Hence, the slight delay 😆 So, on NetBSD dev branch ... |
|
Thankyou! So *BSD we don't need to fix *BSD.
|
https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/termios.h#L149
nixseems accidentaly exposing them. Noted at bytecodealliance/rustix#1706 (comment) .