From 59000174aa50ed6b2d24a71576d15e6a53c5be0c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 16 Jul 2016 01:28:04 +0200 Subject: Add stubs for many libc functions, and a few implemenations too --- src/lib/include/time.h | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) (limited to 'src/lib/include/time.h') diff --git a/src/lib/include/time.h b/src/lib/include/time.h index 6529c9a..fe274bb 100644 --- a/src/lib/include/time.h +++ b/src/lib/include/time.h @@ -1,17 +1,20 @@ #pragma once +#include +#include + // TODO struct tm { - int tm_sec; // Seconds [0,60]. - int tm_min; // Minutes [0,59]. - int tm_hour; // Hour [0,23]. - int tm_mday; // Day of month [1,31]. - int tm_mon; // Month of year [0,11]. - int tm_year; // Years since 1900. - int tm_wday; // Day of week [0,6] (Sunday =0). - int tm_yday; // Day of year [0,365]. - int tm_isdst; // Daylight Savings flag. + int tm_sec; // Seconds [0,60]. + int tm_min; // Minutes [0,59]. + int tm_hour; // Hour [0,23]. + int tm_mday; // Day of month [1,31]. + int tm_mon; // Month of year [0,11]. + int tm_year; // Years since 1900. + int tm_wday; // Day of week [0,6] (Sunday =0). + int tm_yday; // Day of year [0,365]. + int tm_isdst; // Daylight Savings flag. }; typedef int64_t time_t; @@ -20,16 +23,12 @@ time_t time(time_t*); double difftime(time_t time1, time_t time0); char *asctime(const struct tm *tm); -char *asctime_r(const struct tm *tm, char *buf); char *ctime(const time_t *timep); -char *ctime_r(const time_t *timep, char *buf); struct tm *gmtime(const time_t *timep); -struct tm *gmtime_r(const time_t *timep, struct tm *result); struct tm *localtime(const time_t *timep); -struct tm *localtime_r(const time_t *timep, struct tm *result); time_t mktime(struct tm *tm); -- cgit v1.2.3