This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC 1/7] y2038: Introduce struct __timespec64


On Wed, 10 Apr 2019, Lukasz Majewski wrote:

> Exported (installed at /usr/include) struct timespec (to work in above
> three cases):
> 
> struct timespec
>  {
>    time_t tv_sec;   /* Seconds.  */
> #ifdef __USE_TIME_BITS64
> # if BYTE_ORDER == BIG_ENDIAN

BYTE_ORDER and BIG_ENDIAN are in the user's namespace.  You have to use 
implementation-namespace macros in such conditionals in installed headers.

>    int tv_pad: 32;  /* Padding named for checking/setting */

No.  This *must* be unnamed in the installed header, so that initializers 
in user code { seconds, nanoseconds } continue to work as expected (even 
if not formally required to work by the standards, I think it's clear we 
should keep code with such initializers working).

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]