mirror of
https://github.com/fscotto/fsnap.git
synced 2026-11-26 03:09:51 +00:00
Update README now that the sources declare no feature test macros
The Building section described _GNU_SOURCE as an open gap against
SPEC.md section 19. It was closed in e193783: the macros moved to the
Makefile and nothing behind them is outside POSIX.1-2008.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KyCHPAxWzqa3vHKdXJkgx
This commit is contained in:
16
README.md
16
README.md
@@ -40,15 +40,15 @@ make # produces build/fsnap
|
|||||||
make clean
|
make clean
|
||||||
```
|
```
|
||||||
|
|
||||||
The code targets Linux/glibc: it relies on `dirent.d_type`, `realpath(path, NULL)`,
|
The sources declare no feature test macros of their own; the `Makefile` sets
|
||||||
`mkstemp`, and a few `_GNU_SOURCE` extensions. There is no `install` target.
|
`-D_POSIX_C_SOURCE=200809L -D_DEFAULT_SOURCE` for the whole build. Everything
|
||||||
|
used behind them — `getline`, `realpath(path, NULL)`, `mkstemp`, `readlink`,
|
||||||
|
`pathconf` — is POSIX.1-2008, so nothing here requires `_GNU_SOURCE`, which
|
||||||
|
[SPEC.md](SPEC.md) §19 asks the project to avoid. `_DEFAULT_SOURCE` is there for
|
||||||
|
`dirent.d_type`, used as a fast path only, with an `lstat` fallback for
|
||||||
|
`DT_UNKNOWN` as the spec requires.
|
||||||
|
|
||||||
[SPEC.md](SPEC.md) §19 aims wider than that — Linux *and* NetBSD, POSIX
|
Only Linux/glibc has been tested. There is no `install` target.
|
||||||
interfaces over Linux-specific ones. The gap is `_GNU_SOURCE`, which the sources
|
|
||||||
declare per-file; the interfaces actually used behind it (`getline`, `realpath`
|
|
||||||
with a `NULL` buffer) are POSIX.1-2008 and would be reachable through
|
|
||||||
`_POSIX_C_SOURCE 200809L`. `dirent.d_type` is used as a fast path only, with an
|
|
||||||
`lstat` fallback for `DT_UNKNOWN`, as the spec requires.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user