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