You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
termios::Termios::OutputModes does not expost some const for apple & musl #1706
changed the title [-]rustix::termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/-][+]termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/+]on Oct 15, 2026
We shouldn't claim that a constant is missing without evidence that the platform is expected to define it. Please ensure the title and description accurately reflect the platforms affected by this issue.
To make this more practical, OLCUC is not defined in the libc crate for Apple targets, so it cannot currently be implemented in rustix. If you believe this constant should be available, please consider opening an issue upstream with supporting evidence.
changed the title [-]termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/-][+]termios::Termios::OutputModes does not expost some const for musl[/+]on Oct 16, 2026
OLCUC is not defined in the libc crate for Apple targets, so it cannot be implemented in rustix without an upstream definition. You can verify this by removing the apple exclusion from the conditional compilation attributes and running cargo check for an Apple target:
Considering uutils/coreutils#15417 (comment) , we can request to support them.
However, they are probably useful only for uutils and it might no worth to add to rustix which should be "safe".
changed the title [-]termios::Termios::OutputModes does not expost some const for musl[/-][+]termios::Termios::OutputModes does not expost some const for apple & musl[/+]on Oct 17, 2026
Activity
xtqqczze commentedon Oct 15, 2026
It seems
OLCUCdoes not exist in thelibccrate for Apple targets, we should check whether it exists in the Apple headers.oech3 commentedon Oct 15, 2026
While some investigation for macOS is needed, this issue is still open for musl.
oech3 commentedon Oct 15, 2026
https://github.com/search?q=org%3Aapple-oss-distributions+OLCUC&type=code
xtqqczze commentedon Oct 15, 2026
It doesn't exist in
termios.h:[-]rustix::termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/-][+]termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/+]xtqqczze commentedon Oct 16, 2026
@oech3 This issue does not apply to Apple targets, as
OLCUCis not defined in Apple's headers. Please update the issue title and description.oech3 commentedon Oct 16, 2026
I'd like to wait maintainer's response. Kernel itself still might have something (or just an spare of NCCS).
xtqqczze commentedon Oct 16, 2026
We shouldn't claim that a constant is missing without evidence that the platform is expected to define it. Please ensure the title and description accurately reflect the platforms affected by this issue.
oech3 commentedon Oct 16, 2026
xtqqczze commentedon Oct 16, 2026
OLCUCis not defined in XNU, Apple's open-source kernel:https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/termios.h
xtqqczze commentedon Oct 16, 2026
To make this more practical,
OLCUCis not defined in thelibccrate for Apple targets, so it cannot currently be implemented inrustix. If you believe this constant should be available, please consider opening an issue upstream with supporting evidence.[-]termios::Termios::OutputModes does not expost some const e.g. OLCUC for musl and macOS[/-][+]termios::Termios::OutputModes does not expost some const for musl[/+]oech3 commentedon Oct 16, 2026
I updated this issue.
oech3 commentedon Oct 16, 2026
Well... but it actually compiles...
xtqqczze commentedon Oct 16, 2026
oech3 commentedon Oct 16, 2026
But CI complied it.
xtqqczze commentedon Oct 16, 2026
OLCUCis not defined in thelibccrate for Apple targets, so it cannot be implemented inrustixwithout an upstream definition. You can verify this by removing theappleexclusion from the conditional compilation attributes and runningcargo checkfor an Apple target:If you believe
OLCUCis supported on Apple targets, please consider opening an issue upstream with supporting evidence.oech3 commentedon Oct 16, 2026
I understood that source code is properly gated ,but CI compiled it.
oech3 commentedon Oct 16, 2026
https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/termios.h#L149 says
Begin unimplemented features. But const seems given. Though they might be compiled out at most cases...oech3 commentedon Oct 16, 2026
oech3 commentedon Oct 16, 2026
Considering uutils/coreutils#15417 (comment) , we can request to support them.
However, they are probably useful only for uutils and it might no worth to add to
rustixwhich should be "safe".xtqqczze commentedon Oct 16, 2026
Regarding POSIX,
OLCUCwas removed in Issue 6 (2004):https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/termios.h.html#:~:text=The%20LEGACY%20symbols%20IUCLC%2C%20OLCUC%2C%20and%20XCASE%20are%20removed
[-]termios::Termios::OutputModes does not expost some const for musl[/-][+]termios::Termios::OutputModes does not expost some const for apple & musl[/+]