refactor: deprecate ELAST constants#5118
Open
dybucc wants to merge 1 commit into
Open
Conversation
Collaborator
This comment has been minimized.
This comment has been minimized.
This set of constants had already been discussed to cause some issues in rust-lang#3131. This patch deprecates such bu-prone and latest-error symbols such that the interface to the `libc` crate is not prone to SemVer-breakage as often as the values change upstream.
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This set of constants had already been discussed to cause some issues in #3131. This patch
deprecates such bug-prone and latest-error symbols such that the interface to the
libccrate isnot prone to SemVer-breakage as often as the values change upstream.
Note the NetBSD constant was left unmodified as it already had been annotated with a deprecation
attribute.
If you yourself want to help out in the deprecation effort for this type of constants across the
libccrate, maybe try out thelibc-constant-deprecatorcrate. It's been the toolused to perform the changes that have been submitted in this PR, and it very much welcomes bug
reports.
Sources
ELASTmacro declaration, mentioning its use as a "limit"value for other
errnovalues.https://github.com/freebsd/freebsd-src/blob/bd15d6ef126ee4c0eac931117f6bbbf6f9a3fc72/sys/sys/errno.h#L184
https://github.com/openbsd/src/blob/58ff4898d99200dea776fa757004330318255d45/sys/sys/errno.h#L175
https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/errno.h#L270
https://github.com/DragonFlyBSD/DragonFlyBSD/blob/7b7fb99bddde8ded0bee8f43df4026ca02be0938/sys/sys/errno.h#L206
Checklist
libc-test/semverhave been updated*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI