Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 101acff

Browse files
authoredAug 13, 2024··
[libc] Define 'size_t' in time.h and uchar.h (#103441)
Summary: The standard says the following: The <time.h> header shall define the clock_t, size_t, time_t, types as described in <sys/types.h>. I couldn't find one for `uchar.h` but it needs it once we define things like `mbrtoc8`.
1 parent 6cd37eb commit 101acff

File tree

5 files changed

+4
-3
lines changed

5 files changed

+4
-3
lines changed
 

‎libc/include/time.h.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
#include "__llvm-libc-common.h"
1313
#include "llvm-libc-macros/time-macros.h"
14-
#include "llvm-libc-types/clock_t.h"
15-
#include "llvm-libc-types/clockid_t.h"
1614

1715
%%public_api()
1816

‎libc/include/uchar.h.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_UCHAR_H
1111

1212
#include "__llvm-libc-common.h"
13-
#include "llvm-libc-types/mbstate_t.h"
1413

1514
%%public_api()
1615

‎libc/newhdrgen/yaml/time.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ types:
77
- type_name: struct_tm
88
- type_name: time_t
99
- type_name: clock_t
10+
- type_name: size_t
1011
enums: []
1112
objects: []
1213
functions:

‎libc/newhdrgen/yaml/uchar.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ types:
77
- type_name: char16_t
88
- type_name: char8_t
99
- type_name: mbstate_t
10+
- type_name: size_t
1011
enums: []
1112
objects: []
1213
functions: []

‎libc/spec/stdc.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,7 @@ def StdC : StandardSpec<"stdc"> {
14751475
StructTmType,
14761476
StructTimeSpec,
14771477
TimeTType,
1478+
SizeTType,
14781479
],
14791480
[], // Enumerations
14801481
[
@@ -1562,6 +1563,7 @@ def StdC : StandardSpec<"stdc"> {
15621563
Char8TType,
15631564
Char16TType,
15641565
Char32TType,
1566+
SizeTType,
15651567
],
15661568
[], // Enumerations
15671569
[]

0 commit comments

Comments
 (0)
Please sign in to comment.