1 /* $NetBSD: ctime_r.c,v 1.1.1.3 2015/01/02 20:34:27 christos Exp $ */ 2 3 /* $File: ctime_r.c,v 1.1 2012/05/15 17:14:36 christos Exp $ */ 4 5 #include "file.h" 6 #ifndef lint 7 #if 0 8 FILE_RCSID("@(#)$File: ctime_r.c,v 1.1 2012/05/15 17:14:36 christos Exp $") 9 #else 10 __RCSID("$NetBSD: ctime_r.c,v 1.1.1.3 2015/01/02 20:34:27 christos Exp $"); 11 #endif 12 #endif /* lint */ 13 #include <time.h> 14 #include <string.h> 15 16 /* ctime_r is not thread-safe anyway */ 17 char * 18 ctime_r(const time_t *t, char *dst) 19 { 20 char *p = ctime(t); 21 if (p == NULL) 22 return NULL; 23 memcpy(dst, p, 26); 24 return dst; 25 } 26