3 ms·
Is phase 2 that useful? Why would you -D_TIME_BITS to something other than the default? It's a hard thing to do safely, since you're choosing to be ABI incomp
by mlyle 5y ago
Is phase 2 that useful?
Why would you -D_TIME_BITS to something other than the default? It's a hard thing to do safely, since you're choosing to be ABI incompatible (in a way that's not caught at compile or even invocation time) with the system's default.
And then, all you get is a binary that will potentially handle times past 2038 safely, when the whole rest of the system won't.
- MichaelBurge 5y agoI think it lets developers opt-in to fixing their glibc-dependent programs ahead of time, so there's less work to do on stage 3.
- mlyle 5y agoThe thing is, not too much can be expected to break from a 64 bit time_t. Only stuff that directly shoves time_t's over the network or to disk -- a bad practice -- will. Note anything that builds on x86-64 or other 64 bit architectures has already figured out how to tolerate 64 bit time_t's. The major reason it's not safe to build with a 64 bit time_t is because you don't know whether other libraries are. If the C library cuts over, when people/distributions move to the new library version, they know that's not a concern. Defaults change in tooling all the time, requiring code changes for distributions bundling newer tooling/libraries. This one would require less change than most. Of course, it's possible to survive a 64 bit time_t and still not be 2038-safe. But at least you can be correct if you have a C library and other libraries that will tolerate 64 bit time_t's.
- nextaccountic 5y agoSo the fix is to list all libraries in popular distros that break with time_t being 64 bits, file issues for all of them, and track progress somehow. Messing with the defaults is only useful if the ensuing breakage is promptly fixed.
- mlyle 5y ago> So the fix is to list all libraries in popular distros that break with time_t being 64 bits All libraries in popular distros build on x86-64, which in turn means they use a 64 bit time_t there. It's time for 32 bit architectures to join 64 bit architectures in having a 64 bit time_t. Anything that ships today in distributions will ship in embedded systems for 5+ years. And then a lot of those embedded systems (too many) will last a long time. 2026 is getting pretty uncomfortably close to 2038.
- deknos 5y ago> Is phase 2 that useful? Yes for preparing the upgrade seamlessley for developers, administrators and users. you can prepare your buildscripts before it breaks, you can build it easier as feature/forward/backward toggle same logic and code with different toggles is better
- mlyle 5y agoIn practice, all the code in distributions has built in environments with 64 bit time_t. Some end-user legacy code may not be, but it probably isn't much: most things just don't care about a field getting wider behind the scenes. The big pain, IMO, at this point is the big cutover where all libraries need to move to the new ABI. This still doesn't prove things as 2038-safe, but it at least means things reasonably can be 2038-safe on 32 bit if they choose... while today it's impossible for practical purposes.