<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/122006>122006</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [libc][docs][POSIX] flush out documentation for the POSIX defined headers
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            documentation,
            good first issue,
            libc
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          nickdesaulniers
      </td>
    </tr>
</table>

<pre>
    If you go to https://pubs.opengroup.org/onlinepubs/9799919799/, then `14. Headers` in the bottom left, you get a list of headers mandated by POSIX.  I'd like to document them from https://libc.llvm.org/headers/index.html.  We do so by manually curating some metadata about functions and preprocessor defines in yaml files.  The yaml files are currently in https://github.com/llvm/llvm-project/tree/main/libc/utils/docgen. https://github.com/llvm/llvm-project/blob/main/libc/utils/docgen/arpa/inet.yaml is an example of arpa/inet.h as per POSIX.  POSIX also tries to be a superset of C (though FWICT POSIX1.2024 missed C23 additions...), so most headers we have entries for already (though we should triple check since POSIX can add functions to existing C standard headers).

Once we've added entries for the new POSIX headers, you should configure your build with the 2 additional cmake flags:
1. `-DLLVM_ENABLE_SPHINX=ON`
2. `-DLIBC_INCLUDE_DOCS=ON`

Then you can do `ninja docs-libc-html` to build html you can view locally in `{build_dir}/libc/docs/html/headers/**.html`.

Good pull requests should implement one header at a time, and not send a PR that implements documentation for more than one header at a time. If that means that this issue is a "meta" issue for which multiple PRs will link against, so be it.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUVUtv4zYQ_jX0ZRBBpi0_Dj449rprIE2CTdrdW0CJI4kbilT5sON_XwytOE5boNiLLZDznu_7KLxXjUFcseKWFduRiKG1bmVU9SrRi6iNQudHpZWn1b6Gk43QWAgW2hB6zyZrxneM7_pY-sz2aBpnY59Z1zC-s0Yrg3TF-G45Xy6XY_pNHhsILRpgs3w8zeArConOs1kOytANlDY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