4 ms·
Doesn't even compile with -m32. Asks for a missing header, which google indicates to install from a i386 library. I regularly compile a lot of stuff on this ma
by habibur 4y ago
Doesn't even compile with -m32. Asks for a missing header, which google indicates to install from a i386 library.
I regularly compile a lot of stuff on this machine, indicating I never needed that before.
So none of the software I compiled had 32 bit time_t. And we still have 15 more years to migrate anything remaining behind.
- Jorengarenar 4y agoYou explicitly tell the compiler to compile against 32-bit library, but since you don't have one installed, it doesn't compile. If somebody compiles 32-bit program which doesn't require additional dynamic libraries and ships that binary, you won't even know until it fails in 2038. And as you yourself noticed, `time_t` on 64-bit machine is also 64-bit, so even if code was written on 32-bit architecture, if you compile it on 64-bit one, it will automatically become 64-bit.
- panzi 4y agoWorks for me: $ gcc -m32 time_size.c -o time_size $ ./time_size 4 But I have the 32bit development packages installed (besides the 64bit pkgs). Am on Fedora. Though I couldn't find anything like `-D_FILE_OFFSET_BITS=64` for `off_t` and associated functions.