From c4c2836ada90259e4c5632f962dfcda54ac448fa Mon Sep 17 00:00:00 2001 From: "Albert ARIBAUD (3ADEV)" Date: Tue, 18 Dec 2018 23:13:55 +0100 Subject: Y2038: add function __ctime64_r Tested with 'make check' on x86_64-linux-gnu and i686-linux.gnu. * include/time.h (__ctime64_r): Add. * time/ctime_r.c (__ctime64_r): Add. [__TIMESIZE != 64] (__ctime_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 34d9de126b..a10a59a628 100644 --- a/include/time.h +++ b/include/time.h @@ -64,6 +64,14 @@ extern char *__ctime64 (const __time64_t *__timer) __THROW; libc_hidden_proto (__ctime64); #endif +#if __TIMESIZE == 64 +# define __ctime64_r ctime_r +#else +extern char *__ctime64_r (const __time64_t *__restrict __timer, + char *__restrict __buf) __THROW; +libc_hidden_proto (__ctime64_r); +#endif + #if __TIMESIZE == 64 # define __localtime64 localtime #else -- cgit v1.2.3