Repository navigation
Conversation
|
GNU testsuite comparison: |
b287c72 to
9c6d77f
Compare
|
GNU testsuite comparison: |
46cbbc3 to
b989937
Compare
|
GNU testsuite comparison: |
b989937 to
bae055d
Compare
|
GNU testsuite comparison: |
| // Status character | ||
| // ("status", S::VSTATUS), // Not supported by nix | ||
| // Minimum number of characters for noncanonical read. | ||
| // ("min", S::VMIN), |
There was a problem hiding this comment.
Is it possible that the nix compatibility is more about the platform that it is being built on?
There was a problem hiding this comment.
I checked the code, but there are no such definitions... I wanted to submit a change there too, but I'm unsure about what platforms are supported, so I'd rather wait for someone having it to support it
There was a problem hiding this comment.
for this specific case, actually it was defined, but I commented this out since we use the value differently in the code
Related to: uutils/coreutils#9432
bae055d to
173ad5a
Compare
|
GNU testsuite comparison: |
173ad5a to
65b5c7a
Compare
Related to: uutils/coreutils#9432
Related to: uutils/coreutils#9432
704772b to
fa39e80
Compare
|
GNU testsuite comparison: |
f0de189 to
61ce79b
Compare
f7af8cb to
7ac48c8
Compare
Done, thanks! |
7ac48c8 to
6868d67
Compare
| (S::VLNEXT, "^V"), | ||
| #[cfg(not(any(target_os = "aix", target_os = "haiku")))] | ||
| (S::VDISCARD, "^O"), | ||
| #[cfg(any(bsd, target_os = "aix", target_os = "illumos", target_os = "solaris"))] |
There was a problem hiding this comment.
| #[cfg(any(bsd, target_os = "aix", target_os = "illumos", target_os = "solaris"))] | |
| #[cfg(any(bsd, solarish, target_os = "aix"))] |
you can make this kind of change throughout by adding the following cfg alias to src/uu/stty/build.rs:
solarish: { any(target_os = "illumos", target_os = "solaris") }There was a problem hiding this comment.
Let's also add aliases like:
freebsdlike: { any(dragonfly, freebsd) },
netbsdlike: { any(netbsd, openbsd) },There was a problem hiding this comment.
I'm not sure how many people can understand them. (But bsd including apple is already crazy).
There was a problem hiding this comment.
Do we add linux_kernel only for stty?
|
|
||
| #[cfg(any(bsd, target_os = "aix", target_os = "illumos", target_os = "solaris"))] | ||
| #[test] | ||
| fn test_get_sane_control_char_dsusp() { |
|
I'd like to have #15425 before this. |
Rather than repeating file-level `spell-checker:ignore` comments, register the stty-specific words in the shared workspace dictionary so that they are covered everywhere, as suggested in review.
nix cfg-gates some termios flags and control characters out on certain platforms, but stty referenced them unconditionally, so the crate could not be built there at all: Haiku misses VREPRINT, VLNEXT, VWERASE, VDISCARD, IMAXBEL, EXTPROC, B460800 and B921600, and AIX misses VDISCARD, VWERASE, EXTPROC, CRTSCTS and the same high baud rates. Gate the affected definitions with the same predicates nix uses, so that the crate compiles on every target where its dependencies do, as prerequisite for the Haiku support that follows.
It is just an alias for ixoff, and it's marked with `OMIT` in GNU version
Now the order is respected
Enable the remaining GNU flags that nix exposes as well (iuclc, ofill, ofdel and xcase), and list as comments the ones that are not supported by nix and libc (hup, cdtrdsr, flush) or that are handled manually (min and time), so that the lists stay in sync with GNU and it's easier to enable what will be supported in the future.
It's only supported by BSD, aix and solaris, but still available in nix. We need to define a sane default for VDSUSP (^Y)
Nix exposes the Termios line discipline field only on linux, android and haiku, so use it there and keep reading c_line through libc on redox, where nix does not provide the field. On Haiku the field is a c_char, so convert the value from u8 when setting it. See: nix-rust/nix#1802
Ok, fair enough. |
| #[cfg(any(bsd, solarish, target_os = "aix"))] | ||
| // Sends a delayed suspend signal (SIGTSTP). | ||
| ("dsusp", S::VDSUSP), |
| #[cfg(not(any(target_os = "redox", target_os = "aix")))] | ||
| Flag::new("crtscts", C::CRTSCTS), | ||
| // Not supported by nix and libc. | ||
| // Flag::new("cdtrdsr", C::CDTRDSR), |
There was a problem hiding this comment.
CDTRDSR is not defined in POSIX termios.h, which platforms define it?
| ("discard", S::VDISCARD), | ||
| // deprecated compat option. | ||
| // Not supported by nix and libc. | ||
| // ("flush", S::VFLUSHO), |
There was a problem hiding this comment.
not defined in POSIX, which platforms support it?
| #[cfg(not(any(target_os = "linux", target_os = "redox")))] | ||
| #[cfg(target_os = "redox")] | ||
| { | ||
| // nix does not expose the line discipline on Redox, so we get the |


The output of
stty --allwas not really matching GNU one, adjust it to follow the same logicBefore:
After:
Highlight is not great for word diffing, but well:
After the flags we're missing will be included upstream, the diff will be actually none.