[all-commits] [llvm/llvm-project] ba1eae: [libc] Add struct group header and group line pars...

Jeff Bailey via All-commits all-commits at lists.llvm.org
Thu Sep 17 10:19:23 PDT 2026


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

  Changed paths:
    M libc/config/linux/arm/headers.txt
    M libc/config/linux/i386/headers.txt
    M libc/hdr/types/CMakeLists.txt
    A libc/hdr/types/struct_group.h
    M libc/src/CMakeLists.txt
    A libc/src/grp/CMakeLists.txt
    A libc/src/grp/grp_utils.cpp
    A libc/src/grp/grp_utils.h
    M libc/test/src/CMakeLists.txt
    A libc/test/src/grp/CMakeLists.txt
    A libc/test/src/grp/grp_utils_test.cpp

  Log Message:
  -----------
  [libc] Add struct group header and group line parser (#224208)

Introduce the POSIX struct group header and grp_utils parser module for
colon-delimited group records.

Unlike struct passwd, struct group carries a null-terminated char**
member pointer array (gr_mem). parse_line<struct group> handles placing
the gr_mem pointer array into the aligned scratch span directly:
* Fixed-buffer callers (such as reentrant lookups) report ERANGE if the
provided scratch span cannot hold the member pointers.
* Growable DynamicBuffer callers grow the buffer when parse_line returns
ERANGE and retry before parsing in place.

* Add struct_group header in hdr/types/struct_group.h
* Expose libc.include.grp in Linux arm and i386 headers.txt
* Add grp_utils parser and database helpers in src/grp/
* Add unit tests in test/src/grp/grp_utils_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