From b31a0e3d53ce17d4626fe125dd1e1f654a0d192c Mon Sep 17 00:00:00 2001 From: piaip Date: Mon, 5 May 2008 09:14:19 +0000 Subject: - (internal) add localtime4_r thread-safe API git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4271 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/cmsys.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/cmsys.h b/include/cmsys.h index abb66213..a50793fe 100644 --- a/include/cmsys.h +++ b/include/cmsys.h @@ -113,11 +113,15 @@ extern const char* Cdatelite(const time4_t *clock); extern const char* Cdatedate(const time4_t * clock); extern const char * Cdate_mdHM(const time4_t * clock); extern const char* my_ctime(const time4_t * t, char *ans, int len); +extern struct tm localtime4r(const time4_t *t); + #ifdef TIMET64 - struct tm *localtime4(const time4_t *); - time4_t time4(time4_t *); - char *ctime4(const time4_t *); + struct tm* localtime4(const time4_t *); + struct tm* localtime4_r(const time4_t *, struct tm *); + time4_t time4(time4_t *); + char* ctime4(const time4_t *); #else + #define localtime4_r(a,b) localtime_r(a,b) #define localtime4(a) localtime(a) #define time4(a) time(a) #define ctime4(a) ctime(a) -- cgit v1.2.3