From f2d4c718ec4bc26886d4aec0ded9308378660321 Mon Sep 17 00:00:00 2001 From: in2 Date: Thu, 27 Jan 2005 14:50:58 +0000 Subject: add TIMET64 for both 4 or 8 bytes time_t git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2438 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/stuff.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'mbbsd/stuff.c') diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index 945c0ded..602c9b4b 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -498,14 +498,6 @@ gettime(int line, time4_t dt, char*head) } #endif -char * -ctime4(time4_t *clock) -{ - time_t temp = (time_t)*clock; - - return ctime(&temp); -} - char * Cdate(time4_t *clock) { @@ -946,6 +938,15 @@ int qsort_intcompar(const void *a, const void *b) return *(int *)a - *(int *)b; } +#ifdef TIMET64 +char * +ctime4(time4_t *clock) +{ + time_t temp = (time_t)*clock; + + return ctime(&temp); +} + struct tm *localtime4(time4_t *t) { if( t == NULL ) @@ -963,6 +964,7 @@ time4_t time4(time4_t *ptr) else return *ptr = (time4_t)time(NULL); } +#endif #ifdef OUTTACACHE #include -- cgit v1.2.3