Files
Pavel Labath 2bd8d73902 [libc] Add public_includes stanza to hdrgen and use it in socket headers (#205543)
This patch adds support for a public_includes stanza in header YAML
files, allowing generated public headers to include other public
headers.

I use this to make arpa/inet.h include netinet/in.h, and netinet/in.h
include sys/socket.h. While POSIX doesn't strictly require these headers
to include each other, it permits it, and many real-world applications
depend on this behavior.

To make this work, I also needed to reorder the header targets in
include/CMakeLists.txt so that targets sys_socket and netinet_in are
defined before targets declare dependencies on them.

There are a couple of other files that could use this feature (right now
they handle it through the header template), but I'll do that as a
separate patch.

Assisted by Gemini.
2026-06-29 08:13:17 +02:00
..
…

This directory also contains the Python sources for hdrgen, which is
what generates the headers public libc headers. The definitions for these
headers are in the ``include`` directory. The ``.h.def`` files are the bases
and the ``.yaml`` files are the contents.