3 ms·
The year 2038 problem is actually younger than unix. The first definition was 60th of seconds since 1970-01-01T00:00:00.00 stored in two words (note that a wor
by legulere 10y ago
The year 2038 problem is actually younger than unix.
The first definition was 60th of seconds since 1970-01-01T00:00:00.00 stored in two words (note that a word is 18 bit on a PDP-7!). That definition was later changed.
Also Linus could have defined `time_t` to be 64 bit when he started linux.
https://en.wikipedia.org/wiki/Unix_time#History https://en.wikipedia.org/wiki/Unix_time#History
http://aaroncrane.co.uk/2008/02/unix_time/ http://aaroncrane.co.uk/2008/02/unix_time/
- smsm42 10y agoI'm not even sure there was a standard 64-bit type for C in 1991... Or how well compiles on PC would support that.
- caf 10y agoThere wasn't - the largest minimum integer size from C90 (ANSI C) was long, with at least 32 bits. "long long" was agreed upon at an informal summit in 1992 as an extension 64 bit type on 32 bit systems until it was standardised in C99 (but already existed in several compilers at that point, including GCC). So GCC may have had 'long long' already when Linus started working on Linux.
- gravypod 10y agoWell when you're the only person/people using C you can get anything through the compiler committee very quickly.