Forum for Linux distributions to discuss problems and share PSAs
 help / color / mirror / Atom feed
* 64-bit time_t
@ 2024-01-02 12:44 Bernhard M. Wiedemann
  2024-01-02 12:50 ` Neal Gompa
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Bernhard M. Wiedemann @ 2024-01-02 12:44 UTC (permalink / raw)
  To: distributions


[-- Attachment #1.1: Type: text/plain, Size: 1529 bytes --]

In https://lore.kernel.org/distributions/6614772.670kD7asE2@nimes/
Bruno Haible wrote:

> Regarding the distro people:
> 
>   The outcome of a discussion, about a month or two ago, was AFAIU that
>   Linux/x86 and Linux/arm distros have a choice between
>     (a) enabling 64-bit time_t for all packages, thus breaking ABI
>         compatibility once and becoming year 2038 saft, or
>     (b) staying with the 32-bit time_t, and announcing that their
>         distro will stop working in 2038.
>   An incremental or partial move to 64-bit time_t would be too expensive,
>   did the distro people say.

or option c)
One less troublesome solution could be to patch glibc to redefine the 
32-bit time_t as unsigned so that ABIs could remain compatible and at 
the same time it would support timestamps until 2106.
Though that would break any application that uses time_t for dates 
between 1901 and 1970 (are there any?).
Do I miss any other downsides?
This seems to be the only option that allows legacy-binaries to keep 
working after 2038.


option d) would be to adapt all libraries that have time_t in their API 
to have both 32-bit and 64-bit time_t variants. The former for 
compatibility with old binaries and the latter for new future-proof 
binaries. This could provide a smooth transition because not all 
3rd-party binaries can be rebuilt.
The trouble here would be the effort for the libraries to provide 2 
variants and for callers to select the right variant.


Ciao
Bernhard M.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-01-13 23:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-02 12:44 64-bit time_t Bernhard M. Wiedemann
2024-01-02 12:50 ` Neal Gompa
2024-01-02 13:20 ` Adrien Nader
2024-01-13 23:00 ` Andreas K. Huettel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox