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:
Andreas Kling 2020-01-27 10:56:04 +01:00
parent 6906edee9a
commit 23ffd6c319
5 changed files with 5 additions and 5 deletions

View file

@ -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 };

View file

@ -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;

View file

@ -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;

View file

@ -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*);

View file

@ -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;
}