diff options
author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-12-18 23:11:08 +0100 |
---|---|---|
committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-12-18 23:11:08 +0100 |
commit | 64c2277d2eb14b6b485a16b799d900505e2cbe71 (patch) | |
tree | ccf33d4c07dff1a2125da43bf49ab4626f2182e9 /include | |
parent | 64dd7a16305441a7d6ed752c192c68b6c2a54ca5 (diff) | |
download | glibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.tar.gz glibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.tar.xz glibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.zip |
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.
Diffstat (limited to 'include')
-rw-r--r-- | include/time.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/time.h b/include/time.h index 3bc303a36e..876b8a2b5f 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) |