clock_settime: add time64 syscall support, decouple 32-bit time_t
authorRich Felker <dalias@aerifal.cx>
Sun, 28 Jul 2019 22:43:51 +0000 (18:43 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 29 Jul 2019 04:17:02 +0000 (00:17 -0400)
commit7aeecf3e0b5462a05f7173993618eb59ba1a86d5
treef9d01bd3bfac2940c4c45fb6bdbcfc2ad19902f4
parente1501091c404a74f3966441dbf8f6b85bae905c2
clock_settime: add time64 syscall support, decouple 32-bit time_t

time64 syscall is used only if it's the only one defined for the arch,
or if the requested time does not fit in 32 bits. on current 32-bit
archs where time_t is a 32-bit type, this makes it statically
unreachable.

if the time64 syscall is needed because the requested time does not
fit in 32 bits, we define this as an error ENOTSUP, for "The
implementation does not support the requested feature or value".

on 64-bit archs, there is no change to the code after preprocessing.
on current 32-bit archs, the time is moved through an intermediate
copy to remove the assumption that time_t is a 32-bit type.
src/time/clock_settime.c