[PATCH v9] y2038: Introduce the __ASSUME_TIME64_SYSCALLS define
Paul Eggert
eggert@cs.ucla.edu
Fri Aug 30 19:11:00 GMT 2019
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.
More information about the Libc-alpha
mailing list