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] | |
Hi Joseph,
> 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.
This patch has been dropped and superseded by new one:
https://patchwork.ozlabs.org/patch/1085395/
In the above patch the struct __timespec64 is only internal for glibc.
The padding is necessary to avoid passing some random data to kernel
(however, Linux kernel is clearing upper 32 bits of tv_nsec anyway).
The struct __timespec64 is not "installed" anymore - as suggested by
Paul it has been changed as:
https://github.com/lmajewski/y2038_glibc/commit/ea9e29e4d8dbde203325a16962e99e5a6891c741#diff-4ddbc47d3262d4f00f3825e4f3627dbb
In that way we would keep exported/installed struct timespec (as it is
now).
>
> > 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).
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Attachment:
pgpNOCfDiu2Vy.pgp
Description: OpenPGP digital signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |