summaryrefslogtreecommitdiff
path: root/libc/misc/time/asctime_r.c
blob: 21503194958c768393b8630f7a0fe0a07ce0fa67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

#include <time.h>
#include <errno.h>

extern void __asctime();

char *asctime_r(__const struct tm *timeptr, char *buf)
{
    if (timeptr == NULL || buf == NULL) {
	__set_errno (EINVAL);
	return NULL;
    }
    __asctime(buf, timeptr);
    return buf;
}