Skip to content

Commit 13f7786

Browse files
authored
[libc] Remove trivial .h.def files (#149466)
Remove all the .h.def files that already express nothing whatsoever not already expressed in YAML. Clean up a few YAML files without materially changing any generated header output. Many more .h.def files remain that need a bit of conversion in YAML to express macro requirements and such.
1 parent 6acc699 commit 13f7786

25 files changed

+85
-315
lines changed

libc/include/dirent.h.def

Lines changed: 0 additions & 16 deletions
This file was deleted.

libc/include/dirent.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,45 @@
11
header: dirent.h
2-
header_template: dirent.h.def
3-
macros: []
2+
standards:
3+
- posix
44
types:
55
- type_name: struct_dirent
66
- type_name: DIR
77
- type_name: ino_t
8-
enums: []
9-
objects: []
108
functions:
119
- name: alphasort
1210
standards:
13-
- POSIX
11+
- posix
1412
return_type: int
1513
arguments:
1614
- type: const struct dirent **
1715
- type: const struct dirent **
1816
- name: closedir
1917
standards:
20-
- POSIX
18+
- posix
2119
return_type: int
2220
arguments:
2321
- type: DIR *
2422
- name: dirfd
2523
standards:
26-
- POSIX
24+
- posix
2725
return_type: int
2826
arguments:
2927
- type: DIR *
3028
- name: fdopendir
3129
standards:
32-
- POSIX
30+
- posix
3331
return_type: DIR *
3432
arguments:
3533
- type: int
3634
- name: opendir
3735
standards:
38-
- POSIX
36+
- posix
3937
return_type: DIR *
4038
arguments:
4139
- type: const char *
4240
- name: readdir
4341
standards:
44-
- POSIX
42+
- posix
4543
return_type: struct dirent *
4644
arguments:
4745
- type: DIR *

libc/include/search.h.def

Lines changed: 0 additions & 18 deletions
This file was deleted.

libc/include/search.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
header: search.h
2-
header_template: search.h.def
3-
macros: []
2+
standards:
3+
- posix
44
types:
55
- type_name: ACTION
66
- type_name: ENTRY
@@ -12,35 +12,35 @@ objects: []
1212
functions:
1313
- name: hcreate
1414
standards:
15-
- POSIX
15+
- posix
1616
return_type: int
1717
arguments:
1818
- type: size_t
1919
- name: hcreate_r
20-
standards: GNUExtensions
20+
standards: gnu
2121
return_type: int
2222
arguments:
2323
- type: size_t
2424
- type: struct hsearch_data *
2525
- name: hdestroy
26-
standards: GNUExtensions
26+
standards: gnu
2727
return_type: void
2828
arguments: []
2929
- name: hdestroy_r
3030
standards:
31-
- POSIX
31+
- posix
3232
return_type: void
3333
arguments:
3434
- type: struct hsearch_data *
3535
- name: hsearch
3636
standards:
37-
- POSIX
37+
- posix
3838
return_type: ENTRY *
3939
arguments:
4040
- type: ENTRY
4141
- type: ACTION
4242
- name: hsearch_r
43-
standards: GNUExtensions
43+
standards: gnu
4444
return_type: int
4545
arguments:
4646
- type: ENTRY
@@ -49,20 +49,20 @@ functions:
4949
- type: struct hsearch_data *
5050
- name: insque
5151
standards:
52-
- POSIX
52+
- posix
5353
return_type: void
5454
arguments:
5555
- type: void *
5656
- type: void *
5757
- name: remque
5858
standards:
59-
- POSIX
59+
- posix
6060
return_type: void
6161
arguments:
6262
- type: void *
6363
- name: lfind
6464
standards:
65-
- POSIX
65+
- posix
6666
return_type: void *
6767
arguments:
6868
- type: const void *
@@ -72,7 +72,7 @@ functions:
7272
- type: __search_compare_t
7373
- name: lsearch
7474
standards:
75-
- POSIX
75+
- posix
7676
return_type: void *
7777
arguments:
7878
- type: const void *

libc/include/setjmp.h.def

Lines changed: 0 additions & 16 deletions
This file was deleted.

libc/include/setjmp.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
header: setjmp.h
2-
header_template: setjmp.h.def
3-
macros: []
2+
standards:
3+
- stdc
44
types:
55
- type_name: jmp_buf
6-
enums: []
7-
objects: []
86
functions:
97
- name: longjmp
108
standards:
@@ -23,7 +21,7 @@ functions:
2321
- type: jmp_buf
2422
- name: sigsetjmp
2523
standards:
26-
- POSIX
24+
- posix
2725
return_type: int
2826
attributes:
2927
- _Returns_twice
@@ -32,7 +30,7 @@ functions:
3230
- type: int
3331
- name: siglongjmp
3432
standards:
35-
- POSIX
33+
- posix
3634
return_type: _Noreturn void
3735
arguments:
3836
- type: sigjmp_buf

libc/include/spawn.h.def

Lines changed: 0 additions & 16 deletions
This file was deleted.

libc/include/spawn.yaml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
header: spawn.h
2-
header_template: spawn.h.def
3-
macros: []
2+
standards:
3+
- posix
44
types:
55
- type_name: posix_spawn_file_actions_t
66
- type_name: posix_spawnattr_t
77
- type_name: pid_t
88
- type_name: mode_t
9-
enums: []
10-
objects: []
119
functions:
1210
- name: posix_spawn
1311
standards:
14-
- POSIX
12+
- posix
1513
return_type: int
1614
arguments:
1715
- type: pid_t *__restrict
@@ -22,22 +20,22 @@ functions:
2220
- type: char * const * __restrict
2321
- name: posix_spawn_file_actions_addclose
2422
standards:
25-
- POSIX
23+
- posix
2624
return_type: int
2725
arguments:
2826
- type: posix_spawn_file_actions_t *
2927
- type: int
3028
- name: posix_spawn_file_actions_adddup2
3129
standards:
32-
- POSIX
30+
- posix
3331
return_type: int
3432
arguments:
3533
- type: posix_spawn_file_actions_t *
3634
- type: int
3735
- type: int
3836
- name: posix_spawn_file_actions_addopen
3937
standards:
40-
- POSIX
38+
- posix
4139
return_type: int
4240
arguments:
4341
- type: posix_spawn_file_actions_t *__restrict
@@ -47,13 +45,13 @@ functions:
4745
- type: mode_t
4846
- name: posix_spawn_file_actions_destroy
4947
standards:
50-
- POSIX
48+
- posix
5149
return_type: int
5250
arguments:
5351
- type: posix_spawn_file_actions_t *
5452
- name: posix_spawn_file_actions_init
5553
standards:
56-
- POSIX
54+
- posix
5755
return_type: int
5856
arguments:
5957
- type: posix_spawn_file_actions_t *

libc/include/string.h.def

Lines changed: 0 additions & 16 deletions
This file was deleted.

libc/include/string.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
header: string.h
2-
header_template: string.h.def
2+
standards:
3+
- stdc
34
macros:
45
- macro_name: NULL
56
macro_header: null-macro.h
@@ -11,7 +12,7 @@ objects: []
1112
functions:
1213
- name: memccpy
1314
standards:
14-
- POSIX
15+
- posix
1516
return_type: void *
1617
arguments:
1718
- type: void *__restrict
@@ -61,7 +62,7 @@ functions:
6162
- type: size_t
6263
- name: mempcpy
6364
standards:
64-
- POSIX
65+
- posix
6566
return_type: void *
6667
arguments:
6768
- type: void *__restrict
@@ -93,14 +94,14 @@ functions:
9394
- type: size_t
9495
- name: stpcpy
9596
standards:
96-
- POSIX
97+
- posix
9798
return_type: char *
9899
arguments:
99100
- type: char *__restrict
100101
- type: const char *__restrict
101102
- name: stpncpy
102103
standards:
103-
- POSIX
104+
- posix
104105
return_type: char *
105106
arguments:
106107
- type: char *__restrict
@@ -243,7 +244,7 @@ functions:
243244
- type: size_t
244245
- name: strnlen
245246
standards:
246-
- POSIX
247+
- posix
247248
return_type: size_t
248249
arguments:
249250
- type: const char *
@@ -271,7 +272,7 @@ functions:
271272
- type: const char *__restrict
272273
- name: strsignal
273274
standards:
274-
- POSIX
275+
- posix
275276
return_type: char *
276277
arguments:
277278
- type: int
@@ -298,7 +299,7 @@ functions:
298299
- type: const char *__restrict
299300
- name: strtok_r
300301
standards:
301-
- POSIX
302+
- posix
302303
return_type: char *
303304
arguments:
304305
- type: char *__restrict

0 commit comments

Comments
 (0)