2038 is closer than it seems
2038 is closer than it seems
Posted May 22, 2014 4:20 UTC (Thu) by mezcalero (subscriber, #45103)In reply to: 2038 is closer than it seems by adler187
Parent article: 2038 is closer than it seems
The same story happened for large file support (LFS) where off_t got increased in size. Now, off_t is thankfully not that often exposed in APIs, and because people knew how awful the situation was many just avoided exposing it in APIs, but for time_t the situation is much worse.
Also, one particular gem: think of stat() which already exists in two flavours, with LFS and without. Now, this API would also have to be duplicated for 32bit time_t and 64bit time_t. So you get four flavours of this call: stat(), stat64(), stat_t64() and stat64_t64()! Ouch!
And even thinking of duplicating gettimeofday() when there's also clock_gettime(CLOCK_REALTIME) is just wrong...
Lennart
