64 bit time_t on riscv32
Rich Felker
dalias@libc.org
Tue Jan 16 15:56:51 GMT 2024
On Tue, Jan 16, 2024 at 04:46:17PM +0100, Florian Weimer wrote:
> * Adhemerval Zanella Netto:
>
> > My understanding was __USE_TIME_BITS64 would be required only for ABIs
> > that actually would multiple time_t sizes and the glibc 64 bit time_t
> > supported was added on this assumption. However, the design document
> > does state __USE_TIME_BITS64 would be defined even for architectures
> > where is does not require it. I it was not really caught in development
> > because the design creator was not really much involved at the time.
> >
> > I think it should be feasible to fix it, although backporting it would
> > generate a quite large patch.
>
> It will break applications that use __USE_TIME_BITS64 with glibc's
> current semantics centered on time64 redirects (incorrectly, of
> course—it's an internal macro). I think the use in the kernel is
> probably easier to address, and it has to be changed for compatibility
> with other libcs anyway.
If there are applications assuming __USE_TIME_BITS64 implies redirects
and doing some hack around that, they really need to be fixed not to
do that. It will break on musl with (not yet merged) rv32 port as well
as any future 32-bit ports, which won't have any redirects because
there is no legacy 32-bit time_t ABI to support.
Rich
More information about the Libc-help
mailing list