This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC 1/7] y2038: Introduce struct __timespec64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, <libc-alpha at sourceware dot org>
- Date: Wed, 17 Apr 2019 21:42:22 +0000
- Subject: Re: [RFC 1/7] y2038: Introduce struct __timespec64
- References: <20190327085210.22019-1-lukma@denx.de> <20190327085210.22019-2-lukma@denx.de> <alpine.DEB.2.21.1903271340020.25018@digraph.polyomino.org.uk> <20190327161320.22a825e1@jawa> <alpine.DEB.2.21.1903271701220.3655@digraph.polyomino.org.uk> <20190328082403.0f93196d@jawa> <alpine.DEB.2.21.1903281616410.14529@digraph.polyomino.org.uk> <a3331d07-78ff-90c9-ae59-8c9c21d80187@cs.ucla.edu> <alpine.DEB.2.21.1903281636280.14529@digraph.polyomino.org.uk> <30552a11-cc92-3ccf-3b48-367bc2acd2d9@cs.ucla.edu> <alpine.DEB.2.21.1903281718370.14529@digraph.polyomino.org.uk> <d0c1b167-c1c2-cea3-0d24-432faffc3248@cs.ucla.edu> <20190330155807.3e6620b2@jawa> <c4346695-c778-eb04-89d5-c7738e00231b@cs.ucla.edu> <20190410150527.2895dedc@jawa>
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