[all-commits] [llvm/llvm-project] 24cc35: [libc] Implement fstatat in sys/stat (#224334)
Aman Maurya via All-commits
all-commits at lists.llvm.org
Tue Sep 22 02:34:48 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 24cc35cc98486cc156170505ff1952d54713374f
https://github.com/llvm/llvm-project/commit/24cc35cc98486cc156170505ff1952d54713374f
Author: Aman Maurya <amanmaurya9209 at gmail.com>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M libc/config/linux/aarch64/entrypoints.txt
M libc/config/linux/riscv/entrypoints.txt
M libc/config/linux/x86_64/entrypoints.txt
M libc/include/sys/stat.yaml
M libc/src/sys/stat/CMakeLists.txt
A libc/src/sys/stat/fstatat.h
M libc/src/sys/stat/linux/CMakeLists.txt
A libc/src/sys/stat/linux/fstatat.cpp
M libc/test/src/sys/stat/CMakeLists.txt
A libc/test/src/sys/stat/fstatat_test.cpp
Log Message:
-----------
[libc] Implement fstatat in sys/stat (#224334)
### Summary
Implement the standard POSIX.1-2008 function `fstatat` in
`<sys/stat.h>`.
Fixes #224327
### Changes
- Added `fstatat` function specification to
`libc/include/sys/stat.yaml`.
- Added internal header `libc/src/sys/stat/fstatat.h`.
- Implemented `fstatat` in `libc/src/sys/stat/linux/fstatat.cpp` using
the existing `internal::stat_via_statx`.
- Registered `fstatat` entrypoint in `libc/src/sys/stat/CMakeLists.txt`
and `libc/src/sys/stat/linux/CMakeLists.txt`.
- Added entrypoint across Linux targets (`x86_64`, `aarch64`, `riscv`).
- Added hermetic unit tests in
`libc/test/src/sys/stat/fstatat_test.cpp`.
### Testing
- Built and passed hermetic unit test
`libc.test.src.sys.stat.fstatat_test` (5/5 tests passed).
- Verified stat-family suite (`stat_test`, `lstat_test`, `fstat_test`,
`fstatat_test`).
- Ran `generate-libc-headers` and verified generated `sys/stat.h`.
- Verified `docgen.py` output marks `fstatat` as implemented.
- Ran `clang-format` on all touched C++ files.
---------
Co-authored-by: Pavel Labath <pavel at labath.sk>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list