Re: POSIX.1-2024 requires 64-bit time_t

Andreas K. Huettel
2025-05-19T11:31:27Z

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

>
> For glibc, all 64-bit platforms, and the most recently added 32-bit
> platforms (arc, riscv32, or1k), use 64-bit time_t. All older but
> still-supported 32-bit platforms (arm, csky, hppa, m68k, microblaze,
> mips, powerpc, s390, sh, sparc, x86) currently use 32-bit time_t by
> default but can use 64-bit time_t with -D_TIME_BITS=64. For musl, all
> platforms use 64-bit time_t.
>

Yes.

Gentoo is one of the few places where this is still relevant, and where
the upgrade path is also tricky (since we're a source distribution).

We are still in the preparation phase of moving all 32bit architectures
to 64-bit time_t, but nearly all pieces are in place now.

We intend to change the ABI part of CHOST, from -gnu to -gnut64, to
clarify that this can subtly break sytemwide binary compatibility.

[Not of glibc itself, but of other libraries that include time_t in
their headers somehow.]
[[This is not an academic issue. It broke certificate validation of
openssl.]]

For more details (offtopic in this context) please contact me or Sam.

> POSIX.1-2024 requires that an implementation offer a conforming
> environment that supports 64-bit time_t, but it is also free to offer
> other non-conforming environments that use 32-bit time_t.
>
> - Mark
>

--
Andreas K. Hüttel
dilfridge@gentoo.org
Gentoo Linux developer
(council, toolchain, base-system, perl, libreoffice)

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 981 bytes --]