fix: deprecate/fix time_t family types under Windows x86 GNU on stable#5062
Open
dybucc wants to merge 1 commit intorust-lang:mainfrom
Open
fix: deprecate/fix time_t family types under Windows x86 GNU on stable#5062dybucc wants to merge 1 commit intorust-lang:mainfrom
time_t family types under Windows x86 GNU on stable#5062dybucc wants to merge 1 commit intorust-lang:mainfrom
Conversation
Under Windows GNU x86, `time_t` doesn't have the right size and alignment. This is a backwards-incompatible change, so for folks to experiment on stable, a flag has been exposed to allow setting up a 64-bit `time_t` instead. Tests don't fail because we still skip `time_t` and records containing some value of such type whenever we're under this target platform/environment.
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
Under Windows GNU x86,
time_tdoesn't have the right size and alignment. This is abackwards-incompatible change, so for folks to experiment on stable, a
cfghas been exposed toallow exposing a 64-bit
time_tinstead. Tests don't fail because we still skiptime_tandrecords containing some value of such type whenever we're under this target platform/environment.
In #5059, we address the issue with routines involving
time_tvalues by making them link to their32-bit symbols on that platform/environment.
This should allow not breaking existing code (even though incorrect,) while still allowing new code
to experiment with correct size/alignment for
time_tvalues. Thecfgtries to follow the newpractices introduced in #4977.
An additional job was not added to the test matrix in CI because it was instead introduced as part
of the tests in
ci/run.shthat run only under 32-bit machine word and GNU-hosted targets.Sources
None, if any the same as #5032 as this stems from it.
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
@rustbot label +stable-nominated