Skip to content

Commit 34cf684

Browse files
authored
[libc] Move struct timespec from POSIX to StdC (#85010)
`struct timespec` is actually defined in the C standard, not POSIX.
1 parent 096d061 commit 34cf684

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

libc/spec/posix.td

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ def StructDirentPtr : PtrType<StructDirent>;
4242
def StructDirentPtrPtr : PtrType<StructDirentPtr>;
4343
def ConstStructDirentPtrPtr : ConstType<StructDirentPtrPtr>;
4444

45-
def StructTimeSpec : NamedType<"struct timespec">;
46-
def StructTimeSpecPtr : PtrType<StructTimeSpec>;
47-
def ConstStructTimeSpecPtr : ConstType<StructTimeSpecPtr>;
48-
4945
def StructSchedParam : NamedType<"struct sched_param">;
5046
def StructSchedParamPtr : PtrType<StructSchedParam>;
5147
def ConstStructSchedParamPtr : ConstType<StructSchedParamPtr>;

libc/spec/spec.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ def SigHandlerT : NamedType<"__sighandler_t">;
118118

119119
def TimeTType : NamedType<"time_t">;
120120

121+
def StructTimeSpec : NamedType<"struct timespec">;
122+
def StructTimeSpecPtr : PtrType<StructTimeSpec>;
123+
def ConstStructTimeSpecPtr : ConstType<StructTimeSpecPtr>;
124+
121125
def BSearchCompareT : NamedType<"__bsearchcompare_t">;
122126
def QSortCompareT : NamedType<"__qsortcompare_t">;
123127

libc/spec/stdc.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ def StdC : StandardSpec<"stdc"> {
12021202
[ // Types
12031203
ClockT,
12041204
StructTmType,
1205+
StructTimeSpec,
12051206
TimeTType,
12061207
],
12071208
[], // Enumerations

0 commit comments

Comments
 (0)