http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47802
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-21 17:41:20 UTC --- Well, we don't want to use ctime because it is not thread-safe. glibc ctime_r implementation should be safe if the passed buffer is at least 26 bytes long, it calls internally asctime, which is: /* Like asctime, but write result to the user supplied buffer. The buffer is only guaranteed to be 26 bytes in length. */ char * __asctime_r (const struct tm *tp, char *buf) { return asctime_internal (tp, buf, 26); } and asctime_internal uses the passed buflen as second argument to snprintf.