This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v9] y2038: Introduce the __ASSUME_TIME64_SYSCALLS define
On Fri, Aug 30, 2019 at 12:11:24PM -0700, Paul Eggert wrote:
> On 8/30/19 11:59 AM, Zack Weinberg wrote:
> >>>(Do we still have to pretend that using bare 'long' for the type of
> >>>tv_nsec isn't a defect in the relevant standards?)
> >>It's not a defect. There's no reason for a special typedef for this
> >>field because long can necessarily represent the range of nanoseconds,
> >>[0,999999999].
> >It's a defect!
>
> +1. 'long' causes problems in practice and POSIX should be fixed.
> It's not just the problem Zack mentioned; I have application code
> where the build broke because the app unwisely trusted the POSIX
> spec's saying 'long' and assigned the address of tv_nsec to a long *
> pointer, something that doesn't work on x32.
So fix x32. This is an implementation bug. You can't invalidate
valid application code, especially now that it's not just POSIX but
ISO C that defines timespec.
Rich