[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`.
This commit is contained in:
Joseph Huber 2024-08-13 16:02:43 -05:00 committed by GitHub
parent 6cd37eb5de
commit 101acff2e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 3 deletions

View File

@ -11,8 +11,6 @@
#include "__llvm-libc-common.h"
#include "llvm-libc-macros/time-macros.h"
#include "llvm-libc-types/clock_t.h"
#include "llvm-libc-types/clockid_t.h"
%%public_api()

View File

@ -10,7 +10,6 @@
#define LLVM_LIBC_UCHAR_H
#include "__llvm-libc-common.h"
#include "llvm-libc-types/mbstate_t.h"
%%public_api()

View File

@ -7,6 +7,7 @@ types:
- type_name: struct_tm
- type_name: time_t
- type_name: clock_t
- type_name: size_t
enums: []
objects: []
functions:

View File

@ -7,6 +7,7 @@ types:
- type_name: char16_t
- type_name: char8_t
- type_name: mbstate_t
- type_name: size_t
enums: []
objects: []
functions: []

View File

@ -1475,6 +1475,7 @@ def StdC : StandardSpec<"stdc"> {
StructTmType,
StructTimeSpec,
TimeTType,
SizeTType,
],
[], // Enumerations
[
@ -1562,6 +1563,7 @@ def StdC : StandardSpec<"stdc"> {
Char8TType,
Char16TType,
Char32TType,
SizeTType,
],
[], // Enumerations
[]