Skip to content

What time fields should struct stat have? #4965

@tgross35

Description

@tgross35

Prior discussion at #4942

@xbjfk said:

I would personally push for using timespec to:

* 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions