@@ -57,6 +57,13 @@ extern time_t __mktime_internal (struct tm *__tp,
struct tm *),
long int *__offset) attribute_hidden;
+/* nis/nis_print.c needs ctime, so even if ctime is not declared here,
+ we define __ctime64 as ctime so that nis/nis_print.c can get linked
+ against a function called ctime. */
+#if __TIMESIZE == 64
+# define __ctime64 ctime
+#endif
+
#if __TIMESIZE == 64
# define __localtime64 localtime
#else
@@ -19,6 +19,18 @@
/* Return a string as returned by asctime which
is the representation of *T in that form. */
+char *
+__ctime64 (const __time64_t *t)
+{
+ /* The C Standard says ctime (t) is equivalent to asctime (localtime (t)).
+ In particular, ctime and asctime must yield the same pointer. */
+ return asctime (__localtime64 (t));
+}
+
+/* Provide a 32-bit variant if needed */
+
+#if __TIMESIZE != 64
+
char *
ctime (const time_t *t)
{
@@ -26,3 +38,5 @@ ctime (const time_t *t)
In particular, ctime and asctime must yield the same pointer. */
return asctime (localtime (t));
}
+
+#endif