refactor: deprecate off64_t in VxWorks#5129
Open
dybucc wants to merge 1 commit into
Open
Conversation
fb9aeb7 to
675bad7
Compare
This comment has been minimized.
This comment has been minimized.
675bad7 to
3d55d66
Compare
This comment has been minimized.
This comment has been minimized.
Contributor
Author
|
CI actually passes. There seems to be an issue with a glob import that is not used, but this has not |
3d55d66 to
04a0d17
Compare
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 type, alongside aliases such as `time64_t`, are being deprecated in favor of keeping a single, non-suffixed type that is 64-bits wide. In VxWorks, `off64_t` already depends on `off_t`, so deprecating it makes the transition to `off_t` easier.
04a0d17 to
6b96768
Compare
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
As a follow up to #5127, this deprecates the same type on VxWorks. This continues the trend towards supporting a single 64-bit wide type for time and file offset values, instead of having suffixed variants (see more on that in the afore mentioned PR.) VxWorks does short work of it, because
off_tis already defined with that bit-width.While looking through the VxWorks headers, though, I noticed they support a 32-bit
off_twhenever the system is not operating in user-land (with what they refer to as RTPs or Real Time Processes.) I can't include any sources because it's part of the downloadable SDK, but maybe this is worth considering. As per the GNU docs [1], the macro they check for to determine which definition should be made available is exposed when the-mrtpflag is issued during compilation. I haven't considered how would we detect this from the Rust side of things, though, or if we even want to.Something else I wanted to note was that the VxWorks module seems to define functions that are not part of the VxWorks interface (based on the fact they're not declared within an
externblock, and on both the comment that precedes them and the abasence of them in the downloadable SDK.) These use the suffixed variant of theoff_ttype, so I've had to annotate them with anallow(deprecated). Reading through the Linux manpage for those two routines, it may be that VxWorks has some register passing issues when running under x32, but that's just a personal hypothesis from the text and not something explicitly mentioned. It'd be great to get some outside input on this, as I'm not sure why we just reutrn the return value corresponding with an error, without attempting to also seterrno(considering we pull theerrnoRust crate and we're manually implementing these routines, this seems reasonable.)Sources
b_off_t.hundersysroot/usr/h/public/basein the VxWorks downloadable SDK for QEMU x86_64.Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI@rustbot label +stable-nominated