@@ -64,6 +64,10 @@ extern time_t __mktime_internal (struct tm *__tp,
# define __ctime64 ctime
#endif
+#if __TIMESIZE == 64
+# define __ctime64_r ctime_r
+#endif
+
#if __TIMESIZE == 64
# define __localtime64 localtime
#else
@@ -21,9 +21,22 @@
/* Return a string as returned by asctime which is the representation
of *T in that form. Reentrant version. */
+char *
+__ctime64_r (const __time64_t *t, char *buf)
+{
+ struct tm tm;
+ return __asctime_r (__localtime64_r (t, &tm), buf);
+}
+
+/* Provide a 32-bit variant if needed */
+
+#if __TIMESIZE != 64
+
char *
ctime_r (const time_t *t, char *buf)
{
struct tm tm;
return __asctime_r (__localtime_r (t, &tm), buf);
}
+
+#endif