time: Add 64-bit time_t support for ftime

System Internals / glibc - Adhemerval Zanella [linaro.org] - 27 October 2020 12:54 UTC

It basically calls the 64-bit __clock_gettime64 and adds the overflow check.

Checked on x86_64-linux-gnu and i686-linux-gnu.

5d8aa97da2 time: Add 64-bit time_t support for ftime
include/bits/types/struct_timeb.h | 1 +
include/struct___timeb64.h | 16 ++++++++++++++++
include/sys/timeb.h | 12 ++++++++++++
time/Makefile | 2 +-
time/bits/types/struct_timeb.h | 15 +++++++++++++++
time/ftime.c | 28 ++++++++++++++++++++++++----
time/sys/timeb.h | 12 +-----------
7 files changed, 70 insertions(+), 16 deletions(-)

Upstream: sourceware.org


  • Share