[[PATCH,RFC,2] 05/63] Y2038: add function __localtime64_r
Commit Message
---
include/time.h | 3 +++
time/Versions | 2 +-
time/localtime.c | 8 ++++++++
3 files changed, 12 insertions(+), 1 deletion(-)
@@ -64,6 +64,9 @@ extern time_t __mktime_internal (struct tm *__tp,
extern struct tm *__localtime_r (const time_t *__timer,
struct tm *__tp) attribute_hidden;
+extern struct tm *__localtime64_r (const __time64_t *__timer,
+ struct tm *__tp) attribute_hidden;
+
extern struct tm *__gmtime_r (const time_t *__restrict __timer,
struct tm *__restrict __tp);
libc_hidden_proto (__gmtime_r)
@@ -67,6 +67,6 @@ libc {
}
GLIBC_2.27 {
__difftime64;
- __localtime64;
+ __localtime64; __localtime64_r;
}
}
@@ -53,6 +53,14 @@ libc_hidden_def (localtime)
/* 64-bit-time versions */
+/* Return the `struct tm' representation of *T in local time,
+ using *TP to store the result. */
+struct tm *
+__localtime64_r (const __time64_t *t, struct tm *tp)
+{
+ return __tz_convert (*t, 1, tp);
+}
+
/* Return the `struct tm' representation of *T in local time. */
struct tm *
__localtime64 (const __time64_t *t)