fix: fix differing bitwidth types/routines under Windows x86 GNU#5059
Open
dybucc wants to merge 1 commit intorust-lang:mainfrom
Open
fix: fix differing bitwidth types/routines under Windows x86 GNU#5059dybucc wants to merge 1 commit intorust-lang:mainfrom
dybucc wants to merge 1 commit intorust-lang:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
9a434dd to
c8cb7bc
Compare
3 tasks
5a75a87 to
a5c7202
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. |
a5c7202 to
0021301
Compare
Until rust-lang#5032, whenever `libc` was running under Windows x86 with GNU, the default bit-width of `time_t` values was 32-bits. This doesn't quite align with the defaults in MSVC and `mingw`, but that's been addressed in that PR. This PR is a quick patch for stable, as the changes in rust-lang#5032 are not backwards-compatible. It separates the routines that under Windows use `time_t` values and changes their link-time symbols to the 32-bit variants exposed in both MSVC and `mingw`, for the affected target platform/environment. It also adds a test, akin to the one in rust-lang#5032, that should ensure the correct bit-widths are in use for both the types and the linked routine symbols.
0021301 to
4e83e2d
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
Until #5032, whenever
libcwas running under Windows x86 with GNU, the defaultbit-width of
time_tvalues was 32-bits. This doesn't quite align with the defaults in MSVC andmingw, but that's been addressed in that PR.This PR is a quick patch for stable, as the changes in #5032 are not
backwards-compatible. It separates the routines that under Windows use
time_tvalues and changestheir link-time symbols to the 32-bit variants exposed in both MSVC and
mingw, for the affectedtarget platform/environment.
It also adds a test, akin to the one in #5032, that should ensure the correct
bit-widths are in use for both the types and the linked routine symbols.
Note that if both #5062 and this PR are to be merged, it's preferable to merge first #5062, as this
PR will then incorporate support for the
cfgintroduced in that PR.Sources
None. If any, the same as #5032 as this stems from it.
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