diff options
Diffstat (limited to 'time/ctime_r.c')
-rw-r--r-- | time/ctime_r.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/time/ctime_r.c b/time/ctime_r.c index c111146d76..84089599a7 100644 --- a/time/ctime_r.c +++ b/time/ctime_r.c @@ -22,8 +22,21 @@ /* Return a string as returned by asctime which is the representation of *T in that form. Reentrant version. */ char * -ctime_r (const time_t *t, char *buf) +__ctime64_r (const __time64_t *t, char *buf) { struct tm tm; - return __asctime_r (__localtime_r (t, &tm), buf); + return __asctime_r (__localtime64_r (t, &tm), buf); } + +/* Provide a 32-bit wrapper if needed */ + +#if __TIMESIZE != 64 + +char * +ctime_r (const time_t *t, char *buf) +{ + __time64_t t64 = *t; + return __ctime64_r (&t64, buf); +} + +#endif |