aboutsummaryrefslogtreecommitdiff
path: root/misc/Makefile
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-09-08 00:41:33 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-10-24 12:53:03 +0200
commiteaf0f523fb03866d27d2175b7b280a825b91a8c1 (patch)
treed672865a36e2350827cfcd6ca78f2778eebf5f08 /misc/Makefile
parentd6713c0eec62c6e3f8abff9c61e71e61aae70fd3 (diff)
downloadglibc-eaf0f523fb03866d27d2175b7b280a825b91a8c1.zip
glibc-eaf0f523fb03866d27d2175b7b280a825b91a8c1.tar.gz
glibc-eaf0f523fb03866d27d2175b7b280a825b91a8c1.tar.bz2
Y2038: add struct __timespec64
This type is a glibc-internal type similar to struct timespec but whose tv_sec field is a _time64_t rather than a time_t, which makes it Y2038-proof and useable to pass between user code and Y2038-proof kernel syscalls. On 64-bit architectures, and on X32, struct __timespec64 is just an alias of struct timespec, which is already 64-bit. On other architectures, it must be explicitly defined. In order to match the Linux kernel struct, the tv_nsec field of struct __timespec64 is also a signed 64-bit integer. The kernel ensures that the higher half of tv_nsec is always 0, which means glibc does not need to do it. Note: the corresponding glibc public* type will differ from this private type, as the user source code might depend on the tv_nsec field being a 32-bit long, not a 64-bit int. To meet this expectation, the public type will have a 32-bit tv_nsec field plus 32-bit anonymous padding, ordered according to the endianness of the architecture. Tested with make xtests on x86_64 and ARM. * include/bits/types/struct_timespec64.h: Include time/bits/types/struct_timespec64.h * include/time.h (valid_timeval_to_timespec64): Add. * include/time.h (valid_timespec_to_timespec64): Likewise. * include/time.h (valid_timespec64_to_timespec): Likewise. * include/time.h (valid_timespec64_to_timeval): Likewise. * include/time.h (IS_VALID_NANOSECONDS): Likewise. * include/time.h (timespec_to_timespec64): Likewise. * include/time.h (timespec64_to_timespec): Likewise. * include/time.h (timespec64_to_timeval): Likewise. * io/fcntl.h: Include bits/types/struct_timespec64.h. * io/sys/poll.h: Likewise. * io/sys/stat.h: Likewise. * misc/sys/select.h: Likewise. * posix/sched.h: Likewise. * posix/netdb.h: Likewise. * rt/aio.h: Likewise. * rt/mqueue.h: Likewise. * signal/signal.h: Likewise. * sysdeps/nptl/pthread.h: Likewise. * sysdeps/pthread/semaphore.h: Likewise. * sysdeps/unix/sysv/linux/hppa/pthread.h: Likewise. * sysvipc/sys/sem.h: Likewise. * time/Makefile: Add bits/types/struct_timespec64.h * time/bits/types/struct_itimerspec.h: Include bits/types/struct_timespec64.h * time/bits/types/struct_itimerspec64.h: Add. * time/time.h: Include bits/types/struct_timespec64.h
Diffstat (limited to 'misc/Makefile')
0 files changed, 0 insertions, 0 deletions