mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
ead3fc2b31
It turned out that specifying all SRCS and INCS as dependencies on the pattern rules for all headers, caused `make` memory usage to skyrocket from 40mb ot 160mb. This change also reduces the build graph another 4%.
14 lines
435 B
C
14 lines
435 B
C
#include "libc/calls/weirdtypes.h"
|
|
#include "libc/time/struct/tm.h"
|
|
#include "libc/time/time.h"
|
|
|
|
char *ctime(const time_t *timep) {
|
|
/*
|
|
** Section 4.12.3.2 of X3.159-1989 requires that
|
|
** The ctime function converts the calendar time pointed to by timer
|
|
** to local time in the form of a string. It is equivalent to
|
|
** asctime(localtime(timer))
|
|
*/
|
|
struct tm *tmp = localtime(timep);
|
|
return tmp ? asctime(tmp) : NULL;
|
|
}
|