[libc-commits] [libc] [libc][docgen] make note of sys/time.h interfaces removed in POSIX.1-2024 (PR #126612)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Mon Feb 10 14:24:16 PST 2025


https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/126612

One of these days, we'll be able to specify time to a computer...

Link: #124654


>From 3c95b4de5cc17b1ee5e3e652093ac362aa565ac3 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Mon, 10 Feb 2025 14:22:54 -0800
Subject: [PATCH] [libc][docgen] make note of sys/time.h interfaces removed in
 POSIX.1-2024

One of these days, we'll be able to specify time to a computer...

Link: #124654
---
 libc/utils/docgen/docgen.py     | 5 +++++
 libc/utils/docgen/sys/time.yaml | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/libc/utils/docgen/docgen.py b/libc/utils/docgen/docgen.py
index 09db284ef92824a..5a57987b3c51e1a 100755
--- a/libc/utils/docgen/docgen.py
+++ b/libc/utils/docgen/docgen.py
@@ -57,6 +57,7 @@ def check_api(header: Header, api: Dict):
         "c-definition",
         "in-latest-posix",
         "removed-in-posix-2008",
+        "removed-in-posix-2024",
     ]
 
     # Validate macros
@@ -140,6 +141,10 @@ def print_functions_rst(header: Header, functions: Dict):
             print(
                 f"    - `removed in POSIX.1-2008 <https://pubs.opengroup.org/onlinepubs/007904875/functions/{name}.html>`__"
             )
+        elif "removed-in-posix-2024" in functions[name]:
+            print(
+                f"    - `removed in POSIX.1-2024 <https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/{name}.html>`__"
+            )
         else:
             print("    -")
 
diff --git a/libc/utils/docgen/sys/time.yaml b/libc/utils/docgen/sys/time.yaml
index 1e3909adafea390..b7678f403cdcfde 100644
--- a/libc/utils/docgen/sys/time.yaml
+++ b/libc/utils/docgen/sys/time.yaml
@@ -3,3 +3,9 @@ functions:
     in-latest-posix: ''
   utimes:
     in-latest-posix: ''
+  getitimer:
+    removed-in-posix-2024: ''
+  gettimeofday:
+    removed-in-posix-2024: ''
+  setitimer:
+    removed-in-posix-2024: ''



More information about the libc-commits mailing list