summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-27 22:50:58 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-27 22:50:58 +0800
commitf2d4c718ec4bc26886d4aec0ded9308378660321 (patch)
tree3ae7745aa612561ec76e824319295ab443e87b6c /mbbsd
parentda559d7cfe290ad1215a8f8192725b392d8b5e25 (diff)
downloadpttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar.gz
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar.bz2
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar.lz
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar.xz
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.tar.zst
pttbbs-f2d4c718ec4bc26886d4aec0ded9308378660321.zip
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
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c2
-rw-r--r--mbbsd/stuff.c18
2 files changed, 11 insertions, 9 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index a8bccb03..00442c70 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -1355,7 +1355,7 @@ give_id_money(char *user_id, int money, FILE * log_fp, char *mail_title, time4_t
prints("id:%s money:%d ¤£¹ï§a!!", user_id, money);
pressanykey();
} else {
- fprintf(log_fp, "%d %s %d", t, user_id, money);
+ fprintf(log_fp, "%d %s %d", (int)t, user_id, money);
snprintf(tt, sizeof(tt), "%s : %d ptt ¹ô", mail_title, money);
mail_id(user_id, tt, "etc/givemoney.why", "[PTT »È¦æ]");
}
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c
index 945c0ded..602c9b4b 100644
--- a/mbbsd/stuff.c
+++ b/mbbsd/stuff.c
@@ -499,14 +499,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)
{
static char foo[32];
@@ -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 <err.h>