Skip to content

Commit

Permalink
std.c: Unify largefile and time64 support on Linux
Browse files Browse the repository at this point in the history
This commit follows the work done in `std.os.linux`, in that the `Stat`,
`time_t` and `timespec` types have been audited against the libc
definitions and fixed appropriately.

Targeting the `largefile` and `time64` functions require linking to
specific symbols. In order not to over-complicate `std.posix`, which
already uses `lfs64_abi`, the logic for selecting the right function has
been moved into `std.c`. These functions are imported from the new file
`vlfts.zig` along with the two options `largefile_abi` and `time64_abi`.
This allows `std.c` to select the proper symbol for e.g. fstatat, which
could be one of the following:

- `fstatat`.
- `fstatat64`.
- `__fstatat64_time64`.
- `fstatat_time64`.

Simple, isn't it...
  • Loading branch information
The-King-of-Toasters committed Oct 28, 2024
1 parent 46d7348 commit c2d123e
Show file tree
Hide file tree
Showing 3 changed files with 1,064 additions and 253 deletions.
Loading

0 comments on commit c2d123e

Please sign in to comment.