mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
Kernel+LibC+Userland: Switch to 64-bit time_t
Let's not have that 2038 problem people are talking about. :^)
This commit is contained in:
parent
6906edee9a
commit
23ffd6c319
Notes:
sideshowbarker
2024-07-19 09:46:46 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/23ffd6c3193
5 changed files with 5 additions and 5 deletions
|
@ -33,7 +33,7 @@
|
|||
//#define DBFS_DEBUG
|
||||
|
||||
struct CacheEntry {
|
||||
u32 timestamp { 0 };
|
||||
time_t timestamp { 0 };
|
||||
u32 block_index { 0 };
|
||||
u8* data { nullptr };
|
||||
bool has_data { false };
|
||||
|
|
|
@ -294,7 +294,7 @@ struct sigaction {
|
|||
#define OFF_T_MAX 2147483647
|
||||
|
||||
typedef i32 off_t;
|
||||
typedef u32 time_t;
|
||||
typedef i64 time_t;
|
||||
|
||||
struct utimbuf {
|
||||
time_t actime;
|
||||
|
|
|
@ -56,7 +56,7 @@ typedef uint16_t mode_t;
|
|||
typedef uint32_t nlink_t;
|
||||
typedef uint32_t blksize_t;
|
||||
typedef uint32_t blkcnt_t;
|
||||
typedef uint32_t time_t;
|
||||
typedef int64_t time_t;
|
||||
typedef uint32_t useconds_t;
|
||||
typedef int32_t suseconds_t;
|
||||
typedef uint32_t clock_t;
|
||||
|
|
|
@ -49,7 +49,7 @@ extern char* tzname[2];
|
|||
extern int daylight;
|
||||
|
||||
typedef uint32_t clock_t;
|
||||
typedef uint32_t time_t;
|
||||
typedef int64_t time_t;
|
||||
|
||||
struct tm* localtime(const time_t*);
|
||||
struct tm* gmtime(const time_t*);
|
||||
|
|
|
@ -33,7 +33,7 @@ int main(int argc, char** argv)
|
|||
time_t now = time(nullptr);
|
||||
|
||||
if (argc == 2 && !strcmp(argv[1], "-u")) {
|
||||
printf("%u\n", now);
|
||||
printf("%lld\n", now);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue