[libc-commits] [libc] [libc][docs] Add fcntl.h POSIX header documentation (PR #188822)
Kit Dallege via libc-commits
libc-commits at lists.llvm.org
Wed Apr 8 18:14:33 PDT 2026
https://github.com/kovan updated https://github.com/llvm/llvm-project/pull/188822
>From b6ae073df54f3c79c77cc4718195650abe027d70 Mon Sep 17 00:00:00 2001
From: Kit Dallege <xaum.io at gmail.com>
Date: Thu, 26 Mar 2026 19:43:11 +0100
Subject: [PATCH 1/3] [libc][docs] Add fcntl.h POSIX header documentation
Add YAML documentation for fcntl.h listing all functions (creat, fcntl,
open, openat, posix_fadvise, posix_fallocate) and macros (O_*, F_*,
AT_*, FD_*, POSIX_FADV_*) as defined in POSIX.1-2024.
Part of #122006
---
libc/docs/headers/index.rst | 1 +
libc/utils/docgen/fcntl.yaml | 121 +++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+)
create mode 100644 libc/utils/docgen/fcntl.yaml
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 573c5d185f38a..12f49b45543f2 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -13,6 +13,7 @@ Implementation Status
dirent
endian
errno
+ fcntl
fenv
float
glob
diff --git a/libc/utils/docgen/fcntl.yaml b/libc/utils/docgen/fcntl.yaml
new file mode 100644
index 0000000000000..7a6b656cc0a80
--- /dev/null
+++ b/libc/utils/docgen/fcntl.yaml
@@ -0,0 +1,121 @@
+functions:
+ creat:
+ in-latest-posix: ''
+ fcntl:
+ in-latest-posix: ''
+ open:
+ in-latest-posix: ''
+ openat:
+ in-latest-posix: ''
+ posix_fadvise:
+ in-latest-posix: ''
+ posix_fallocate:
+ in-latest-posix: ''
+
+macros:
+ AT_EACCESS:
+ in-latest-posix: ''
+ AT_FDCWD:
+ in-latest-posix: ''
+ AT_REMOVEDIR:
+ in-latest-posix: ''
+ AT_SYMLINK_FOLLOW:
+ in-latest-posix: ''
+ AT_SYMLINK_NOFOLLOW:
+ in-latest-posix: ''
+ FD_CLOEXEC:
+ in-latest-posix: ''
+ FD_CLOFORK:
+ in-latest-posix: ''
+ F_DUPFD:
+ in-latest-posix: ''
+ F_DUPFD_CLOEXEC:
+ in-latest-posix: ''
+ F_DUPFD_CLOFORK:
+ in-latest-posix: ''
+ F_GETFD:
+ in-latest-posix: ''
+ F_GETFL:
+ in-latest-posix: ''
+ F_GETLK:
+ in-latest-posix: ''
+ F_GETOWN:
+ in-latest-posix: ''
+ F_OFD_GETLK:
+ in-latest-posix: ''
+ F_OFD_SETLK:
+ in-latest-posix: ''
+ F_OFD_SETLKW:
+ in-latest-posix: ''
+ F_OWNER_PGRP:
+ in-latest-posix: ''
+ F_OWNER_PID:
+ in-latest-posix: ''
+ F_RDLCK:
+ in-latest-posix: ''
+ F_SETFD:
+ in-latest-posix: ''
+ F_SETFL:
+ in-latest-posix: ''
+ F_SETLK:
+ in-latest-posix: ''
+ F_SETLKW:
+ in-latest-posix: ''
+ F_SETOWN:
+ in-latest-posix: ''
+ F_UNLCK:
+ in-latest-posix: ''
+ F_WRLCK:
+ in-latest-posix: ''
+ O_ACCMODE:
+ in-latest-posix: ''
+ O_APPEND:
+ in-latest-posix: ''
+ O_CLOEXEC:
+ in-latest-posix: ''
+ O_CLOFORK:
+ in-latest-posix: ''
+ O_CREAT:
+ in-latest-posix: ''
+ O_DIRECTORY:
+ in-latest-posix: ''
+ O_DSYNC:
+ in-latest-posix: ''
+ O_EXCL:
+ in-latest-posix: ''
+ O_EXEC:
+ in-latest-posix: ''
+ O_NOCTTY:
+ in-latest-posix: ''
+ O_NOFOLLOW:
+ in-latest-posix: ''
+ O_NONBLOCK:
+ in-latest-posix: ''
+ O_RDONLY:
+ in-latest-posix: ''
+ O_RDWR:
+ in-latest-posix: ''
+ O_RSYNC:
+ in-latest-posix: ''
+ O_SEARCH:
+ in-latest-posix: ''
+ O_SYNC:
+ in-latest-posix: ''
+ O_TRUNC:
+ in-latest-posix: ''
+ O_TTY_INIT:
+ in-latest-posix: ''
+ O_WRONLY:
+ in-latest-posix: ''
+ POSIX_FADV_DONTNEED:
+ in-latest-posix: ''
+ POSIX_FADV_NORMAL:
+ in-latest-posix: ''
+ POSIX_FADV_NOREUSE:
+ in-latest-posix: ''
+ POSIX_FADV_RANDOM:
+ in-latest-posix: ''
+ POSIX_FADV_SEQUENTIAL:
+ in-latest-posix: ''
+ POSIX_FADV_WILLNEED:
+ in-latest-posix: ''
>From e88203aec327f1908bc425bb777944204668e648 Mon Sep 17 00:00:00 2001
From: Kit Dallege <xaum.io at gmail.com>
Date: Thu, 26 Mar 2026 20:08:13 +0100
Subject: [PATCH 2/3] [libc][docs] Add fcntl.h to docgen build list
---
libc/docs/CMakeLists.txt | 1 +
libc/docs/headers/index.rst | 3 ---
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libc/docs/CMakeLists.txt b/libc/docs/CMakeLists.txt
index 68fe9fc545781..ded8efefd662d 100644
--- a/libc/docs/CMakeLists.txt
+++ b/libc/docs/CMakeLists.txt
@@ -47,6 +47,7 @@ if (SPHINX_FOUND)
dirent
endian
errno
+ fcntl
fenv
float
glob
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index 12f49b45543f2..f4ad77b490761 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -13,7 +13,6 @@ Implementation Status
dirent
endian
errno
- fcntl
fenv
float
glob
@@ -45,6 +44,4 @@ Implementation Status
unistd
wchar
wctype
-..
- TODO: https://github.com/llvm/llvm-project/issues/123821
pthread
>From bf4a47ea6611841c3c184d0f8c4c6ec191a64b29 Mon Sep 17 00:00:00 2001
From: Kit Dallege <xaum.io at gmail.com>
Date: Thu, 26 Mar 2026 20:18:50 +0100
Subject: [PATCH 3/3] [libc][docs] Fix index.rst: restore fcntl entry and
pthread comment
---
libc/docs/headers/index.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libc/docs/headers/index.rst b/libc/docs/headers/index.rst
index f4ad77b490761..12f49b45543f2 100644
--- a/libc/docs/headers/index.rst
+++ b/libc/docs/headers/index.rst
@@ -13,6 +13,7 @@ Implementation Status
dirent
endian
errno
+ fcntl
fenv
float
glob
@@ -44,4 +45,6 @@ Implementation Status
unistd
wchar
wctype
+..
+ TODO: https://github.com/llvm/llvm-project/issues/123821
pthread
More information about the libc-commits
mailing list