[all-commits] [llvm/llvm-project] 8fdbba: [libc][unistd] Support _SC_GET(GR|PW)_R_SIZE_MAX i...
Alexey Samsonov via All-commits
all-commits at lists.llvm.org
Tue Sep 8 13:58:43 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8fdbba5073a6fe2ae16be0117f8f473eea27dc2a
https://github.com/llvm/llvm-project/commit/8fdbba5073a6fe2ae16be0117f8f473eea27dc2a
Author: Alexey Samsonov <vonosmas at gmail.com>
Date: 2026-09-08 (Tue, 08 Sep 2026)
Changed paths:
M libc/include/llvm-libc-macros/linux/unistd-macros.h
M libc/include/unistd.yaml
M libc/src/unistd/linux/sysconf.cpp
M libc/test/src/unistd/CMakeLists.txt
M libc/test/src/unistd/sysconf_test.cpp
Log Message:
-----------
[libc][unistd] Support _SC_GET(GR|PW)_R_SIZE_MAX in sysconf. (#222135)
* Add support for POSIX-specified `_SC_GETGR_R_SIZE_MAX` and
`_SC_GETPW_R_SIZE_MAX`
constants used as arguments to `sysconf` function;
* Return -1 for these values - they provide "initial size" for
user-supplied buffers passed to `getgr*` and `getpw*`
functions, but there's no real maximum limit imposed by the LLVM-libc
implementation, and user might provide a
size they can, and rely on `ERANGE` return values if the chosen size
ended up being too small for pwd/group entries.
* Add unit test coverage, and update the unit test to use proxy headers
instead of system-provided `<unistd.h>`.
Also, properly test errno values returned by `sysconf`.
This fixes one of the remaining blockers for building Clang against
LLVM-libc (https://github.com/llvm/llvm-project/issues/97191)
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