What time fields should `struct stat` have?
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.6k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 69
Description
Prior discussion at https://github.com/rust-lang/libc/pull/4942
@xbjfk said:
I would personally push for using
timespecto:* Closer match the libc source * Be POSIX correct and match the correct C usage / docs / man pages. * Have more compatibility with other architectures (hermit, AIX and hurd are already) * Make struct definitions easier to read (especially with bi-endian architectures) * We can remove a lot of test skips.I personally think the best path forward would be to revert 55fa65b so that people can try the new experimental musl with less breaking changes (and fixing loongarch) and reintroduce the name change without a feature gate for all platforms in the 1.0 branch only for the reasons listed above (virtually every UNIX platform supported by libc uses timespec).
IIRC this was changed with time64 changes the because having conditional definitions for the padding was a bit unwieldy.
Will look into making a PR for this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the prior discussion in PR 4942 and commit 55fa65b, then review how struct stat time fields are represented across the supported platforms. The quoted proposal identifies timespec, time64 padding, musl, loongarch, hermit, AIX, and hurd as relevant areas. Done means the maintainers agree on the representation and the required platform and test changes are identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100