This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Y2038: add type __time64_t
There is a key definition you are missing in this patch: one that says
whether the particular glibc configuration supports 32-bit time_t at all.
This new macro could go in bits/wordsize.h, or in its own installed
header. The value is normally the same as (__WORDSIZE == 32), *except* on
x32, which already has 64-bit time_t despite 32-bit wordsize.
The new macro would be used, in the installed headers, to control whether
an explicit _TIME_BITS=32 is valid or not. It would also be used, in
glibc internals, to control whether there are separate 32-bit interfaces
that wrap 64-bit ones, or whether the 64-bit names are just #defined to
the generic ones (#define __clock_gettime64 __clock_gettime, in some
internal header, for example) to avoid creating any new interfaces in the
case where time_t is already 64-bit, while avoiding the need for lots of
conditionals where glibc-internal code written for 64-bit time_t wishes to
call such interfaces.
--
Joseph S. Myers
joseph@codesourcery.com