#ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_TIME_H #include #endif char *ctime_r(const time_t *timep, char *buf) { /* no thread safety. */ char* result = ctime(timep); if(buf && result) strcpy(buf, result); return result; }