POSIX: change struct stat/stat64 times to timespec#5069
Open
xbjfk wants to merge 15 commits intorust-lang:mainfrom
Open
POSIX: change struct stat/stat64 times to timespec#5069xbjfk wants to merge 15 commits intorust-lang:mainfrom
xbjfk wants to merge 15 commits intorust-lang:mainfrom
Conversation
Source: https://github.com/illumos/illumos-gate/blob/5882dd1367bb5bcc67b3d8719c715fe3feb0de15/usr/src/uts/common/sys/stat.h#L72 Note: timestruc_t is an alias for struct timespec: https://github.com/illumos/illumos-gate/blob/5882dd1367bb5bcc67b3d8719c715fe3feb0de15/usr/src/uts/common/sys/time_impl.h#L81
They have all been fixed.
Contributor
Author
|
Hmm, since freebsd11 no longer depends on c_long, the prelude is no longer necessary - but it feels wrong to remove. |
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
Since this was evidently a problem when doing musl changes,no objections in #4965 and v1 being in alpha, it's time to rip the band aid off and do it.
Of course, there are a couple unsolved questions:
libc/src/windows/mod.rs
Lines 52 to 54 in 17adf2d
libc/src/windows/mod.rs
Line 43 in 17adf2d
libc/src/unix/newlib/generic.rs
Lines 22 to 27 in 0dddfc8
xtimespecinstead ofxtim: https://github.com/apple-oss-distributions/xnu/blob/f6217f891ac0bb64f3d375211650a4c1ff8ca1ea/bsd/sys/stat.h#L202-L206 - but interestingly, Swift seems to rename this to the POSIX correct form, despite the underlying C headers not having it: https://github.com/apple/swift-system/blob/main/Sources/System/FileSystem/Stat.swift#L428. We need to pick one.Also, solid and qurt do not have nsec at all. NTO and VxWorks have already migrated.
Sources
In each relevant commit.
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
As discussed in / Fixes: #4965