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