X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Flibc.so_src%2Finclude_exp%2Ftime.h;h=4c8d3ea6994256beb87426261574e2c20528acf7;hb=2610c32930309a73308f64731a05f2e83487b731;hp=8480d68d63c0206e639ec0de885a0aae883d689e;hpb=e7a76b0d8a0cc6aa77966509780973a6f8216ef7;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/include_exp/time.h b/Usermode/Libraries/libc.so_src/include_exp/time.h index 8480d68d..4c8d3ea6 100644 --- a/Usermode/Libraries/libc.so_src/include_exp/time.h +++ b/Usermode/Libraries/libc.so_src/include_exp/time.h @@ -11,6 +11,10 @@ #include // time_t #include // size_t +#ifdef __cplusplus +extern "C" { +#endif + struct tm { int tm_sec; // 0-60 @@ -47,16 +51,24 @@ extern time_t time(time_t *t); // //! Convert the time structure into a string of form 'Sun Sep 16 01:03:52 1973\n\0' extern char *asctime(const struct tm *timeptr); +extern char *asctime_r(const struct tm *timeptr, char *buf); //! asctime(localtime(timer)) extern char *ctime(const time_t *timer); +extern char *ctime_r(const time_t *timer, struct tm *result); //! Convert \a timter into UTC extern struct tm *gmtime(const time_t *timer); +extern struct tm *gmtime_r(const time_t *timer, struct tm *result); extern struct tm *localtime(const time_t *timer); +extern struct tm *localtime_r(const time_t *timep, struct tm *result); + +extern size_t strftime(char*s, size_t maxsize, const char*format, const struct tm*timeptr); -extern size_t strftime(char*restrict s, size_t maxsize, const char*restrict format, const struct tm*restrict timeptr); +#ifdef __cplusplus +}; +#endif #include