This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [v13 2/2] Y2038: make __tz_convert compatible with 64-bit-time
Does anyone see a way to make the code dealing with defining wrappers on
systems with 32-bit time_t, and using #define to avoid the need for such
wrappers on systems where time_t is only ever 64-bit, less repetitive? My
guess is that's hard to do on two counts: (a) because across all the
functions in glibc that involve time, there are many differences of detail
in the wrappers needed; and (b) because the header code, although more
repetitive, involves #define so can't simply be generated from the
expansion of some wrapper-generating macro. ((b) is similar to various
questions arising from ideas about symbol namespace that might involve
many more such repetitive declarations in installed headers, depending on
whether we eliminate any support for compilers without asm redirection
support using installed glibc headers.)
In any case, this patch does two different things: it changes certain
*internal* interfaces to use 64-bit time (and also to use time values
passed directly rather than via pointers), and it sets up versions of
*public* interfaces that use 64-bit time. I'd rather keep the two
separate, doing the internal change first (since the internal functions in
question don't appear to call any of the public interfaces, only the other
way round). The internal change should be uncontroversial; the change to
public interfaces at least could do with more people looking carefully at
the design, as we're going to get many more such wrappers and so want to
make sure the design is the best we can come up with before adding lots of
repetitive code.
--
Joseph S. Myers
joseph@codesourcery.com