asctime_r.c revision 267897
1154974Smlaier/* $File: asctime_r.c,v 1.1 2012/05/15 17:14:36 christos Exp $ */ 2154974Smlaier 3154974Smlaier#include "file.h" 4154974Smlaier#ifndef lint 5154974SmlaierFILE_RCSID("@(#)$File: asctime_r.c,v 1.1 2012/05/15 17:14:36 christos Exp $") 6#endif /* lint */ 7#include <time.h> 8#include <string.h> 9 10/* asctime_r is not thread-safe anyway */ 11char * 12asctime_r(const struct tm *t, char *dst) 13{ 14 char *p = asctime(t); 15 if (p == NULL) 16 return NULL; 17 memcpy(dst, p, 26); 18 return dst; 19} 20