[[PATCH,RFC,2] 04/63] Y2038: add function __localtime64
Commit Message
---
include/time.h | 4 ++++
time/Versions | 1 +
time/localtime.c | 9 +++++++++
3 files changed, 14 insertions(+)
@@ -9,6 +9,8 @@ extern __typeof (strftime_l) __strftime_l;
libc_hidden_proto (__strftime_l)
extern __typeof (strptime_l) __strptime_l;
+extern struct tm *__localtime64 (const __time64_t *__timer);
+
libc_hidden_proto (time)
libc_hidden_proto (asctime)
libc_hidden_proto (mktime)
@@ -17,6 +19,8 @@ libc_hidden_proto (localtime)
libc_hidden_proto (strftime)
libc_hidden_proto (strptime)
+libc_hidden_proto (__localtime64)
+
extern __typeof (clock_getres) __clock_getres;
extern __typeof (clock_gettime) __clock_gettime;
libc_hidden_proto (__clock_gettime)
@@ -67,5 +67,6 @@ libc {
}
GLIBC_2.27 {
__difftime64;
+ __localtime64;
}
}
@@ -50,3 +50,12 @@ localtime (const time_t *t)
return __tz_convert (*t, 1, &_tmbuf);
}
libc_hidden_def (localtime)
+
+/* 64-bit-time versions */
+
+/* Return the `struct tm' representation of *T in local time. */
+struct tm *
+__localtime64 (const __time64_t *t)
+{
+ return __tz_convert (*t, 1, &_tmbuf);
+}