aboutsummaryrefslogtreecommitdiff
path: root/include/time.h
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-12-18 23:11:08 +0100
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-12-18 23:11:08 +0100
commit64c2277d2eb14b6b485a16b799d900505e2cbe71 (patch)
treeccf33d4c07dff1a2125da43bf49ab4626f2182e9 /include/time.h
parent64dd7a16305441a7d6ed752c192c68b6c2a54ca5 (diff)
downloadglibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.zip
glibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.tar.gz
glibc-64c2277d2eb14b6b485a16b799d900505e2cbe71.tar.bz2
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/time.h')
-rw-r--r--include/time.h8
1 files changed, 8 insertions, 0 deletions
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)