[all-commits] [llvm/llvm-project] 6f653e: [libc] Add getgrent, setgrent, and endgrent entryp...

Jeff Bailey via All-commits all-commits at lists.llvm.org
Fri Sep 18 02:23:19 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6f653e2e40ef7095b5cb04cd0b34d8d5b754301b
      https://github.com/llvm/llvm-project/commit/6f653e2e40ef7095b5cb04cd0b34d8d5b754301b
  Author: Jeff Bailey <jbailey at raspberryginger.com>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M libc/config/linux/aarch64/entrypoints.txt
    M libc/config/linux/arm/entrypoints.txt
    M libc/config/linux/i386/entrypoints.txt
    M libc/config/linux/riscv/entrypoints.txt
    M libc/config/linux/x86_64/entrypoints.txt
    M libc/include/grp.yaml
    M libc/src/grp/CMakeLists.txt
    A libc/src/grp/endgrent.cpp
    A libc/src/grp/endgrent.h
    A libc/src/grp/getgrent.cpp
    A libc/src/grp/getgrent.h
    A libc/src/grp/setgrent.cpp
    A libc/src/grp/setgrent.h
    M libc/test/src/grp/CMakeLists.txt
    A libc/test/src/grp/getgrent_test.cpp
    A libc/test/src/grp/grp_test_utils.h

  Log Message:
  -----------
  [libc] Add getgrent, setgrent, and endgrent entrypoints (#224372)

Implement the POSIX group database iteration entrypoints getgrent,
setgrent, and endgrent on top of grp_utils and FlatFileDatabase.

Non-reentrant calls read into a process-global DynamicBuffer that grows
to the high-water mark of the largest group record seen. endgrent closes
the file stream without freeing the buffer so pointers returned prior to
endgrent remain valid until the next non-reentrant call.

* Add getgrent, setgrent, and endgrent entrypoints
* Define getgrent, setgrent, and endgrent in include/grp.yaml
* Expose entrypoints across Linux target architectures
* Add hermetic integration tests in test/src/grp/getgrent_test.cpp

Assisted-by: Automated tooling, human reviewed.



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