[libc-commits] [libc] [libc] corrected yaml files in newhdrgen (PR #98069)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 15:28:41 PDT 2024


https://github.com/aaryanshukla updated https://github.com/llvm/llvm-project/pull/98069

>From a25f35e723116f826e66ea824734184a83764f21 Mon Sep 17 00:00:00 2001
From: Aaryan Shukla <aaryanshukla at google.com>
Date: Mon, 8 Jul 2024 19:44:15 +0000
Subject: [PATCH 1/3] [libc] corrected yaml files in newhdrgen

- fixed little issues in yaml issues through testing
- corrected function class in the case there is no attribute
---
 .../class_implementation/classes/function.py  |  2 +-
 libc/newhdrgen/tests/test_integration.py      |  2 +-
 libc/newhdrgen/yaml/inttypes.yaml             |  2 +-
 libc/newhdrgen/yaml/pthread.yaml              | 48 +++++-----
 libc/newhdrgen/yaml/sched.yaml                |  3 +-
 libc/newhdrgen/yaml/signal.yaml               | 16 ++--
 libc/newhdrgen/yaml/stdio.yaml                | 87 ++++++++-----------
 libc/newhdrgen/yaml/stdlib.yaml               | 50 ++++++-----
 libc/newhdrgen/yaml/string.yaml               | 12 +--
 libc/newhdrgen/yaml/termios.yaml              |  4 +-
 10 files changed, 107 insertions(+), 119 deletions(-)

diff --git a/libc/newhdrgen/class_implementation/classes/function.py b/libc/newhdrgen/class_implementation/classes/function.py
index f79b53de9ade4b..c73fe8db6bb11b 100644
--- a/libc/newhdrgen/class_implementation/classes/function.py
+++ b/libc/newhdrgen/class_implementation/classes/function.py
@@ -20,7 +20,7 @@ def __init__(
         ]
         self.standards = standards
         self.guard = guard
-        self.attributes = attributes or []
+        self.attributes = attributes or ""
 
     def __str__(self):
         attributes_str = self.attributes
diff --git a/libc/newhdrgen/tests/test_integration.py b/libc/newhdrgen/tests/test_integration.py
index 228fecc7f41c04..49deac83c59fbc 100644
--- a/libc/newhdrgen/tests/test_integration.py
+++ b/libc/newhdrgen/tests/test_integration.py
@@ -23,7 +23,7 @@ def setUp(self):
         )
 
         self.maxDiff = None
-        # Adjust based on your directory structure such as being in build etc.
+        
         self.source_dir = Path(__file__).resolve().parent.parent.parent.parent
 
     def run_script(self, yaml_file, h_def_file, output_dir):
diff --git a/libc/newhdrgen/yaml/inttypes.yaml b/libc/newhdrgen/yaml/inttypes.yaml
index 772a1a0e06b214..6e3d1346f60061 100644
--- a/libc/newhdrgen/yaml/inttypes.yaml
+++ b/libc/newhdrgen/yaml/inttypes.yaml
@@ -1,5 +1,5 @@
 header: inttypes.h
-macros: 
+macros: []
 types:
   - type_name: imaxdiv_t
 enums: []
diff --git a/libc/newhdrgen/yaml/pthread.yaml b/libc/newhdrgen/yaml/pthread.yaml
index 9ffcf454035ff2..14a562082d5deb 100644
--- a/libc/newhdrgen/yaml/pthread.yaml
+++ b/libc/newhdrgen/yaml/pthread.yaml
@@ -73,23 +73,23 @@ functions:
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_attr_t * __restrict
-      - type: size_t * __restrict
+      - type: const pthread_attr_t *__restrict
+      - type: size_t *__restrict
   - name: pthread_attr_getstack
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_attr_t * __restrict
-      - type: void * * __restrict
-      - type: size_t * __restrict
+      - type: const pthread_attr_t *__restrict
+      - type: void **__restrict
+      - type: size_t *__restrict
   - name: pthread_attr_getstacksize
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_attr_t * __restrict
-      - type: size_t * __restrict
+      - type: const pthread_attr_t *__restrict
+      - type: size_t *__restrict
   - name: pthread_attr_setdetachstate
     standards: 
       - POSIX
@@ -130,15 +130,15 @@ functions:
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_condattr_t * __restrict
+      - type: const pthread_condattr_t *__restrict
       - type: clockid_t * __restrict
   - name: pthread_condattr_getpshared
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_condattr_t * __restrict
-      - type: int * __restrict
+      - type: const pthread_condattr_t *__restrict
+      - type: int *__restrict
   - name: pthread_condattr_init
     standards: 
       - POSIX
@@ -164,8 +164,8 @@ functions:
       - POSIX
     return_type: int
     arguments:
-      - type: pthread_t * __restrict
-      - type: const pthread_attr_t * __restrict
+      - type: pthread_t *__restrict
+      - type: const pthread_attr_t *__restrict
       - type: __pthread_start_t
       - type: void *
   - name: pthread_detach
@@ -207,7 +207,7 @@ functions:
     return_type: int
     arguments:
       - type: pthread_t
-      - type: void * *
+      - type: void **
   - name: pthread_key_create
     standards: 
       - POSIX
@@ -244,8 +244,8 @@ functions:
       - POSIX
     return_type: int
     arguments:
-      - type: pthread_mutex_t * __restrict
-      - type: const pthread_mutexattr_t * __restrict
+      - type: pthread_mutex_t *__restrict
+      - type: const pthread_mutexattr_t *__restrict
   - name: pthread_mutex_lock
     standards: 
       - POSIX
@@ -275,42 +275,42 @@ functions:
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_mutexattr_t * __restrict
-      - type: int * __restrict
+      - type: const pthread_mutexattr_t *__restrict
+      - type: int *__restrict
   - name: pthread_mutexattr_getrobust
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_mutexattr_t * __restrict
-      - type: int * __restrict
+      - type: const pthread_mutexattr_t *__restrict
+      - type: int *__restrict
   - name: pthread_mutexattr_gettype
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: const pthread_mutexattr_t * __restrict
-      - type: int * __restrict
+      - type: const pthread_mutexattr_t *__restrict
+      - type: int *__restrict
   - name: pthread_mutexattr_setpshared
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: pthread_mutexattr_t * __restrict
+      - type: pthread_mutexattr_t *__restrict
       - type: int
   - name: pthread_mutexattr_setrobust
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: pthread_mutexattr_t * __restrict
+      - type: pthread_mutexattr_t *__restrict
       - type: int
   - name: pthread_mutexattr_settype
     standards: 
       - POSIX
     return_type: int
     arguments:
-      - type: pthread_mutexattr_t * __restrict
+      - type: pthread_mutexattr_t *__restrict
       - type: int
   - name: pthread_once
     standards: 
diff --git a/libc/newhdrgen/yaml/sched.yaml b/libc/newhdrgen/yaml/sched.yaml
index 11a55b7d993b90..7b164bfeee3919 100644
--- a/libc/newhdrgen/yaml/sched.yaml
+++ b/libc/newhdrgen/yaml/sched.yaml
@@ -77,7 +77,8 @@ functions:
     standards: 
       - POSIX 
     return_type: int
-    arguments: []
+    arguments: 
+      - type: void
   - name: __sched_getcpucount
     standards: 
       - llvm_libc_ext
diff --git a/libc/newhdrgen/yaml/signal.yaml b/libc/newhdrgen/yaml/signal.yaml
index a95273419dbde4..980bd5d90c4b66 100644
--- a/libc/newhdrgen/yaml/signal.yaml
+++ b/libc/newhdrgen/yaml/signal.yaml
@@ -1,7 +1,5 @@
 header: signal.h
-macros:
-  - macro_name: __need_size_t
-    macro_value: null
+macros: []
 types:
   - type_name: pid_t
   - type_name: stack_t
@@ -32,15 +30,15 @@ functions:
     return_type: int
     arguments:
       - type: int
-      - type: const struct sigaction * __restrict
-      - type: struct sigaction * __restrict
+      - type: const struct sigaction *__restrict
+      - type: struct sigaction *__restrict
   - name: sigaltstack
     standards: 
       - POSIX 
     return_type: int
     arguments:
-      - type: const stack_t * __restrict
-      - type: stack_t * __restrict
+      - type: const stack_t *__restrict
+      - type: stack_t *__restrict
   - name: sigdelset
     standards: 
       - POSIX 
@@ -67,8 +65,8 @@ functions:
     return_type: int
     arguments:
       - type: int
-      - type: const sigset_t * __restrict
-      - type: sigset_t * __restrict
+      - type: const sigset_t *__restrict
+      - type: sigset_t *__restrict
   - name: sigfillset
     standards: 
       - POSIX 
diff --git a/libc/newhdrgen/yaml/stdio.yaml b/libc/newhdrgen/yaml/stdio.yaml
index 2fdc772da122c8..6d2a8557f9b94d 100644
--- a/libc/newhdrgen/yaml/stdio.yaml
+++ b/libc/newhdrgen/yaml/stdio.yaml
@@ -10,6 +10,8 @@ macros:
     macro_value: stdout
   - macro_name: stdin
     macro_value: stdin
+  - macro_name: stderr
+    macro_value: stderr
 types:
   - type_name: size_t
   - type_name: off_t
@@ -42,87 +44,87 @@ functions:
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
-      - type: const char * __restrict
+      - type: char *__restrict
+      - type: const char *__restrict
       - type: ...
   - name: snprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: size_t
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: ...
   - name: fprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: FILE * __restrict
-      - type: const char * __restrict
+      - type: FILE *__restrict
+      - type: const char *__restrict
       - type: ...
   - name: printf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: ...
   - name: vsprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
-      - type: const char * __restrict
+      - type: char *__restrict
+      - type: const char *__restrict
       - type: va_list
   - name: vsnprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: size_t
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: va_list
   - name: vfprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: FILE * __restrict
-      - type: const char * __restrict
+      - type: FILE *__restrict
+      - type: const char *__restrict
       - type: va_list
   - name: vprintf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: va_list
   - name: sscanf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: const char * __restrict
-      - type: const char * __restrict
+      - type: const char *__restrict
+      - type: const char *__restrict
       - type: ...
   - name: scanf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: ...
   - name: fscanf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: FILE * __restrict
-      - type: const char * __restrict
+      - type: FILE *__restrict
+      - type: const char *__restrict
       - type: ... 
   - name: fileno
     standards: 
@@ -202,9 +204,9 @@ functions:
       - stdc 
     return_type: char *
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: int
-      - type: FILE * __restrict
+      - type: FILE *__restrict
   - name: fflush
     standards: 
       - stdc
@@ -230,8 +232,8 @@ functions:
       - stdc
     return_type: int
     arguments:
-      - type: const char * __restrict
-      - type: FILE * __restrict
+      - type: const char *__restrict
+      - type: FILE *__restrict
   - name: fopencookie
     standards: 
       - GNUExtensions
@@ -245,19 +247,19 @@ functions:
       - stdc
     return_type: size_t
     arguments:
-      - type: void * __restrict
+      - type: void *__restrict
       - type: size_t
       - type: size_t
-      - type: FILE * __restrict
+      - type: FILE *__restrict
   - name: fread_unlocked
     standards: 
       - GNUExtensions
     return_type: size_t
     arguments:
-      - type: void * __restrict
+      - type: void *__restrict
       - type: size_t
       - type: size_t
-      - type: FILE * __restrict
+      - type: FILE *__restrict
   - name: fseek
     standards: 
       - stdc
@@ -283,19 +285,19 @@ functions:
       - stdc
     return_type: size_t
     arguments:
-      - type: const void * __restrict
+      - type: const void *__restrict
       - type: size_t
       - type: size_t
-      - type: FILE * __restrict
+      - type: FILE *__restrict
   - name: fwrite_unlocked
     standards: 
       - GNUExtensions
     return_type: size_t
     arguments:
-      - type: const void * __restrict
+      - type: const void *__restrict
       - type: size_t
       - type: size_t
-      - type: FILE * __restrict
+      - type: FILE *__restrict
   - name: getc
     standards: 
       - stdc
@@ -342,15 +344,15 @@ functions:
       - stdc
     return_type: void
     arguments:
-      - type: FILE * __restrict
-      - type: char * __restrict
+      - type: FILE *__restrict
+      - type: char *__restrict
   - name: setvbuf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: FILE * __restrict
-      - type: char * __restrict
+      - type: FILE *__restrict
+      - type: char *__restrict
       - type: int
       - type: size_t
   - name: ungetc
@@ -360,18 +362,3 @@ functions:
     arguments:
       - type: int
       - type: FILE *
-  - name: stderr
-    standards: 
-      - stdc
-    return_type: extern FILE *
-    arguments: []
-  - name: stdin
-    standards: 
-      - stdc
-    return_type: extern FILE *
-    arguments: []
-  - name: stdout
-    standards: 
-      - stdc 
-    return_type: extern FILE *
-    arguments: []
diff --git a/libc/newhdrgen/yaml/stdlib.yaml b/libc/newhdrgen/yaml/stdlib.yaml
index 032b47f8291e61..478c65bfce3d04 100644
--- a/libc/newhdrgen/yaml/stdlib.yaml
+++ b/libc/newhdrgen/yaml/stdlib.yaml
@@ -1,6 +1,6 @@
 header: stdlib.h
 standards: 
-      - stdc
+  - stdc
 macros: []
 types:
   - type_name: __atexithandler_t
@@ -31,7 +31,7 @@ functions:
       - stdc
     return_type: double
     arguments:
-      - type: const char * __restrict
+      - type: const char *__restrict
   - name: atol
     standards: 
       - stdc
@@ -110,7 +110,8 @@ functions:
     standards: 
       - stdc
     return_type: int
-    arguments: []
+    arguments:
+      - type: void
   - name: srand
     standards: 
       - stdc
@@ -122,80 +123,80 @@ functions:
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: size_t
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: double
   - name: strfromf
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: size_t
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: float
   - name: strfroml
     standards: 
       - stdc
     return_type: int
     arguments:
-      - type: char * __restrict
+      - type: char *__restrict
       - type: size_t
-      - type: const char * __restrict
+      - type: const char *__restrict
       - type: long double
   - name: strtod
     standards: 
       - stdc
     return_type: double
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
   - name: strtof
     standards: 
       - stdc
     return_type: float
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
   - name: strtol
     standards: 
       - stdc
     return_type: long
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
       - type: int
   - name: strtold
     standards: 
       - stdc
     return_type: long double
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
   - name: strtoll
     standards: 
       - stdc
     return_type: long long
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
       - type: int
   - name: strtoul
     standards: 
       - stdc
     return_type: unsigned long
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
       - type: int
   - name: strtoull
     standards: 
       - stdc
     return_type: unsigned long long
     arguments:
-      - type: const char * __restrict
-      - type: char * * __restrict
+      - type: const char *__restrict
+      - type: char **__restrict
       - type: int
   - name: malloc
     standards: 
@@ -240,7 +241,8 @@ functions:
     standards: 
       - stdc
     return_type: _Noreturn void
-    arguments: []
+    arguments:
+      - type: void
   - name: at_quick_exit
     standards: 
       - stdc
diff --git a/libc/newhdrgen/yaml/string.yaml b/libc/newhdrgen/yaml/string.yaml
index 7080a9b7cb3a75..f0e8efb5b77d75 100644
--- a/libc/newhdrgen/yaml/string.yaml
+++ b/libc/newhdrgen/yaml/string.yaml
@@ -56,7 +56,7 @@ functions:
   - name: strcpy
     standards: 
       - stdc
-    return_type: char
+    return_type: char *
     arguments:
       - type: char *__restrict
       - type: const char *__restrict
@@ -282,16 +282,16 @@ functions:
       - BSDExtensions
     return_type: size_t
     arguments:
-      - type: char *__restrict
-      - type: char *__restrict
+      - type: const char *__restrict
+      - type: const char *__restrict
       - type: size_t
   - name: strlcpy
     standards: 
       - BSDExtensions
     return_type: size_t
     arguments:
-      - type: char *__restrict
-      - type: char *__restrict
+      - type: const char *__restrict
+      - type: const char *__restrict
       - type: size_t
   - name: strsep
     standards: 
@@ -299,4 +299,4 @@ functions:
     return_type: char *
     arguments:
       - type: char **__restrict
-      - type: char *__restrict
+      - type: const char *__restrict
diff --git a/libc/newhdrgen/yaml/termios.yaml b/libc/newhdrgen/yaml/termios.yaml
index 17986f8c0fc63e..045279f5e9ff53 100644
--- a/libc/newhdrgen/yaml/termios.yaml
+++ b/libc/newhdrgen/yaml/termios.yaml
@@ -24,14 +24,14 @@ functions:
   - name: cfsetispeed
     standards: 
       - POSIX
-    return_type: int
+    return_type: speed_t
     arguments:
       - type: struct termios *
       - type: speed_t
   - name: cfsetospeed
     standards: 
       - POSIX
-    return_type: int
+    return_type: speed_t
     arguments:
       - type: struct termios *
       - type: speed_t

>From d632f1cef88e51294106d706fa33b3d97ecca0ed Mon Sep 17 00:00:00 2001
From: Aaryan Shukla <aaryanshukla at google.com>
Date: Mon, 8 Jul 2024 19:48:31 +0000
Subject: [PATCH 2/3] used black formatter

---
 libc/newhdrgen/tests/test_integration.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/newhdrgen/tests/test_integration.py b/libc/newhdrgen/tests/test_integration.py
index 49deac83c59fbc..59d8d4204a578b 100644
--- a/libc/newhdrgen/tests/test_integration.py
+++ b/libc/newhdrgen/tests/test_integration.py
@@ -23,7 +23,7 @@ def setUp(self):
         )
 
         self.maxDiff = None
-        
+
         self.source_dir = Path(__file__).resolve().parent.parent.parent.parent
 
     def run_script(self, yaml_file, h_def_file, output_dir):

>From d359788fdeb11dbffa7d7dceb398c5831e05ba2b Mon Sep 17 00:00:00 2001
From: Aaryan Shukla <aaryanshukla at google.com>
Date: Mon, 8 Jul 2024 22:28:10 +0000
Subject: [PATCH 3/3] finished rest of .yaml files for testing

- only math.yaml left
---
 libc/newhdrgen/yaml/sys_mman.yaml    |  7 ++--
 libc/newhdrgen/yaml/sys_syscall.yaml |  7 ++++
 libc/newhdrgen/yaml/sys_types.yaml   |  1 +
 libc/newhdrgen/yaml/threads.yaml     | 13 +++++++
 libc/newhdrgen/yaml/time.yaml        |  3 +-
 libc/newhdrgen/yaml/unistd.yaml      | 51 +++++++++-------------------
 6 files changed, 42 insertions(+), 40 deletions(-)
 create mode 100644 libc/newhdrgen/yaml/sys_syscall.yaml

diff --git a/libc/newhdrgen/yaml/sys_mman.yaml b/libc/newhdrgen/yaml/sys_mman.yaml
index 16a6463b0917d4..c465f6b2c791e8 100644
--- a/libc/newhdrgen/yaml/sys_mman.yaml
+++ b/libc/newhdrgen/yaml/sys_mman.yaml
@@ -1,5 +1,4 @@
 header: sys-mman.h
-standards: POSIX
 macros: []
 types:
   - type_name: mode_t
@@ -42,7 +41,7 @@ functions:
     arguments:
       - type: void *
       - type: size_t
-  - name: POSIX_madvise
+  - name: posix_madvise
     standards: 
       - POSIX
     return_type: int
@@ -50,7 +49,6 @@ functions:
       - type: void *
       - type: size_t
       - type: int
-  # this is a linux function
   - name: mincore
     standards: 
       - Linux
@@ -90,7 +88,8 @@ functions:
     standards: 
       - POSIX
     return_type: int
-    arguments: []
+    arguments:
+      - type: void
   - name: msync
     standards: 
       - POSIX
diff --git a/libc/newhdrgen/yaml/sys_syscall.yaml b/libc/newhdrgen/yaml/sys_syscall.yaml
new file mode 100644
index 00000000000000..c0a64338b6f7ea
--- /dev/null
+++ b/libc/newhdrgen/yaml/sys_syscall.yaml
@@ -0,0 +1,7 @@
+header: sys-syscall.h
+standards: Linux
+macros: []
+types: []
+enums: []
+functions: []
+objects: []
diff --git a/libc/newhdrgen/yaml/sys_types.yaml b/libc/newhdrgen/yaml/sys_types.yaml
index 20cf9bcd39da3b..15eaf107f69156 100644
--- a/libc/newhdrgen/yaml/sys_types.yaml
+++ b/libc/newhdrgen/yaml/sys_types.yaml
@@ -5,6 +5,7 @@ types:
   - type_name: uid_t
   - type_name: time_t
   - type_name: pthread_t
+  - type_name: pthread_rwlock_t
   - type_name: pthread_rwlockattr_t
   - type_name: pthread_mutex_t
   - type_name: blkcnt_t
diff --git a/libc/newhdrgen/yaml/threads.yaml b/libc/newhdrgen/yaml/threads.yaml
index ef472af8bfd328..73da229b52713e 100644
--- a/libc/newhdrgen/yaml/threads.yaml
+++ b/libc/newhdrgen/yaml/threads.yaml
@@ -146,3 +146,16 @@ functions:
     return_type: int
     arguments:
       - type: tss_t
+  - name: tss_get
+    standards:
+      - stdc
+    return_type: void *
+    arguments:
+      - type: tss_t
+  - name: tss_set
+    standards:
+      - stdc
+    return_type: int
+    arguments:
+      - type: tss_t
+      - type: void *
diff --git a/libc/newhdrgen/yaml/time.yaml b/libc/newhdrgen/yaml/time.yaml
index fbdf1877924846..e7f8de65eeb754 100644
--- a/libc/newhdrgen/yaml/time.yaml
+++ b/libc/newhdrgen/yaml/time.yaml
@@ -34,7 +34,8 @@ functions:
     standard: 
       - stdc
     return_type: clock_t
-    arguments: []
+    arguments:
+      - type: void
   - name: difftime
     standard: 
       - stdc
diff --git a/libc/newhdrgen/yaml/unistd.yaml b/libc/newhdrgen/yaml/unistd.yaml
index 511746aa19e856..94b1368531657b 100644
--- a/libc/newhdrgen/yaml/unistd.yaml
+++ b/libc/newhdrgen/yaml/unistd.yaml
@@ -100,22 +100,26 @@ functions:
     standards: 
       - POSIX
     return_type: uid_t
-    arguments: []
+    arguments:
+      - type: void
   - name: getpid
     standards: 
       - POSIX
     return_type: int
-    arguments: []
+    arguments:
+      - type: void
   - name: getppid
     standards: 
       - POSIX
     return_type: int
-    arguments: []
+    arguments:
+      - type: void
   - name: getuid
     standards: 
       - POSIX
     return_type: uid_t
-    arguments: []
+    arguments:
+      - type: void
   - name: isatty
     standards: 
       - POSIX
@@ -186,16 +190,16 @@ functions:
       - POSIX
     return_type: ssize_t
     arguments:
-      - type: const char * __restrict
-      - type: char * __restrict
+      - type: const char *__restrict
+      - type: char *__restrict
       - type: size_t
   - name: readlinkat
     standards: 
       - POSIX
     return_type: ssize_t
     arguments:
-      - type: const char * __restrict
-      - type: char * __restrict
+      - type: const char *__restrict
+      - type: char *__restrict
       - type: size_t
   - name: rmdir
     standards: 
@@ -273,7 +277,8 @@ functions:
     standards: 
       - POSIX
     return_type: pid_t
-    arguments: []
+    arguments:
+      - type: void
   - name: __llvm_libc_syscall
     standards: 
       - POSIX
@@ -299,31 +304,7 @@ functions:
       - POSIX
     return_type: void
     arguments:
-      - type: const void * __restrict
+      - type: const void *__restrict
       - type: void *
       - type: ssize_t
-  - name: enivron
-    standards: 
-      - POSIX
-    return_type: extern char **
-    arguments: []
-  - name: optarg
-    standards: 
-      - POSIX
-    return_type: extern char *
-    arguments: []
-  - name: optind
-    standards: 
-      - POSIX
-    return_type: extern int 
-    arguments: []
-  - name: optopt
-    standards: 
-      - POSIX
-    return_type: extern int 
-    arguments: []
-  - name: opterr
-    standards: 
-      - POSIX
-    return_type: extern int 
-    arguments: []
+ 
\ No newline at end of file



More information about the libc-commits mailing list