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
On Wed, 13 Jun 2018, Paul Eggert wrote:
> Albert ARIBAUD wrote:
> > - a "size" macro (e.g. __TIMESIZE) defined equal to __WORDSIZE except
> > for x32 where it would be defined as 64?
> >
> > I have a slight preference for the "size" form.
>
> Works for me. Though C11 uses _WIDTH for names that count bit widths of
> integers, so I'd mildly prefer __TIME_WIDTH as it is a new name.
Whatever the name, it needs to be clear that this macro relates to the
time_t used by default (unsuffixed) functions in this glibc - *not*
necessarily the time_t for the current compilation. (Rather, _TIME_BITS
== 64 && (new macro) == 32 would be the condition for the installed
headers to need to redirect calls to time-related functions.)
The width macros are from TS 18661-1, not C11 (hopefully they'll end up as
an unconditional feature of C2x without requiring
__STDC_WANT_IEC_60559_BFP_EXT__, since there is demand for them outside
the floating-point context of passing them to the fromfp functions). If
there were a TIME_WIDTH addition to that set of macros, I'd expect it to
relate to the current compilation.
--
Joseph S. Myers
joseph@codesourcery.com