From 64c2277d2eb14b6b485a16b799d900505e2cbe71 Mon Sep 17 00:00:00 2001 From: "Albert ARIBAUD (3ADEV)" Date: Tue, 18 Dec 2018 23:11:08 +0100 Subject: Y2038: add function __localtime64_r Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__localtime64_r): Add. * time/localtime.c (__localtime64_r): Add. [__TIMESIZE != 64] (__localtime_r): Turn into a wrapper. --- include/time.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/time.h b/include/time.h index 3bc303a..876b8a2 100644 --- a/include/time.h +++ b/include/time.h @@ -67,6 +67,14 @@ libc_hidden_proto (__localtime64) extern struct tm *__localtime_r (const time_t *__timer, struct tm *__tp) attribute_hidden; +#if __TIMESIZE == 64 +# define __localtime64_r __localtime_r +#else +extern struct tm *__localtime64_r (const __time64_t *__timer, + struct tm *__tp); +libc_hidden_proto (__localtime64_r) +#endif + extern struct tm *__gmtime_r (const time_t *__restrict __timer, struct tm *__restrict __tp); libc_hidden_proto (__gmtime_r) -- cgit v1.1