3 ms·
> This can be observed with the large file support extension, which is needed to handle files larger than 2GiB, you must always build your code with -D_FILE_OFF
by kazinator 5y ago
> This can be observed with the large file support extension, which is needed to handle files larger than 2GiB, you must always build your code with -D_FILE_OFFSET_BITS=64. And, similarly, if you’re on a 32-bit system, and you do not build your app with -D_TIME_BITS=64, it will not be built using an ABI that is Y2038-compliant.
_TIME_BITS=64 is not working for me on an Ubuntu 18 system based on glibc 2.27 (three plus years old), and I see nothing in the header files that switches time_t.
This must be something new?
_FILE_OFFSET_BITS is old, on the other hand.
Edit: I see in the git log that this has 2021 all over it:
https://sourceware.org/git/?p=glibc.git&a=search&h=HEAD&st=commit&s=_TIME_BITS https://sourceware.org/git/?p=glibc.git&a=search&h=HEAD&st=c...
Anyway, it's too early to see if this is "bad". The unknown quantity is the behavior of distro people. Distro people have the ability to override this default, such that all the packages have 64 bit time_t, and the toolchain is configured to build that. I have some faith in distro people.