C11 and KTime improvements
This commit is contained in:
parent
a379454139
commit
287b3bc043
11
include/stdalign.h
Normal file
11
include/stdalign.h
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
#ifndef __STDALIGN_H__
|
||||
#define __STDALIGN_H__
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
#define alignas _Alignas
|
||||
#define alignof _Alignof
|
||||
#endif
|
||||
|
||||
#endif /* __STDALIGN_H__ */
|
||||
|
@ -21,5 +21,7 @@ NO_RETURN void Panic(const char *str);
|
||||
int kprintf(const char *fmt, ...);
|
||||
void Debug_Assert(const char *fmt, ...);
|
||||
|
||||
#define static_assert _Static_assert
|
||||
|
||||
#endif /* __KASSERT_H__ */
|
||||
|
||||
|
@ -58,7 +58,7 @@ KTime_DaysInMonth(uint64_t year, uint64_t month)
|
||||
}
|
||||
|
||||
/*
|
||||
* This function recomputes yday or wday given all other fields
|
||||
* This function recomputes yday, mday or wday given other fields
|
||||
*/
|
||||
void
|
||||
KTime_Fixup(KTime *tm)
|
||||
@ -173,8 +173,9 @@ KTime_SetTime(const KTime *tm)
|
||||
}
|
||||
|
||||
void
|
||||
KTime_GetTime(const KTime *tm)
|
||||
KTime_GetTime(KTime *tm)
|
||||
{
|
||||
KTime_FromEpoch(KTime_GetEpoch(), tm);
|
||||
}
|
||||
|
||||
UnixEpoch
|
||||
|
Loading…
Reference in New Issue
Block a user