This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 2/2] Y2038: make __tz_convert compatible with 64-bit-time
On 06/14/2018 06:51 AM, Albert ARIBAUD (3ADEV) wrote:
+#if __TIMESIZE == 64
+# define __ctime64 ctime
+# define __ctime64_r ctime_r
+#endif
+
+#if __TIMESIZE == 64
+# define __localtime64 localtime
+#else
+extern struct tm *__localtime64 (const __time64_t *__timer);
+#endif
These don't seem symmetric. Why don't we need an extern declaration for
__ctime_64 or for __ctime_64_r? If the code is correct, maybe a comment why?
+#if (__TIMESIZE != 64)
No parentheses here (and similarly elsewhere).
+/* 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));
Please indent the comment to be like what it was before.
Otherwise looks good; thanks.