diff options
author | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-24 22:06:48 +0800 |
---|---|---|
committer | in2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-01-24 22:06:48 +0800 |
commit | 9084d9602e8725a6fb832d4396c12ddd7bb2b7c7 (patch) | |
tree | 78d04dab42a50e73845c8e31eb877001fb8379cd /mbbsd/mbbsd.c | |
parent | f6324fdcb56a70815842cc39cb1826ce6b82148c (diff) | |
download | pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.gz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.bz2 pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.lz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.xz pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.tar.zst pttbbs-9084d9602e8725a6fb832d4396c12ddd7bb2b7c7.zip |
use time4_t(uint32_t) instead of time_t for x86-64 arch.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2426 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index 1237a8db..a616da9e 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -217,7 +217,7 @@ talk_request(int sig) bell(); if (currutmp->msgcount) { char timebuf[100]; - time_t now = time(0); + time4_t now = time(0); move(0, 0); clrtoeol(); @@ -263,13 +263,11 @@ show_call_in(int save, int which) if (save) { char genbuf[200]; - time_t now; if (!fp_writelog) { sethomefile(genbuf, cuser.userid, fn_writelog); fp_writelog = fopen(genbuf, "a"); } if (fp_writelog) { - time(&now); fprintf(fp_writelog, "%s [%s]\n", buf, Cdatelite(&now)); } } @@ -878,12 +876,10 @@ user_login() { char i; struct tm *ptime, *tmp; - time_t now; int a, ifbirth; /* get local time */ - time(&now); - ptime = localtime(&now); + ptime = localtime4(&now); /* 初始化: random number 增加user跟時間的差異 */ mysrand(); @@ -932,7 +928,7 @@ user_login() enter_uflag = cuser.uflag; currutmp->birth = ifbirth; - tmp = localtime(&(cuser.lastlogin)); + tmp = localtime4(&(cuser.lastlogin)); if ((a = SHM->UTMPnumber) > SHM->max_user) { SHM->max_user = a; SHM->max_time = now; @@ -1458,7 +1454,7 @@ static int check_ban_and_load(int fd) { FILE *fp; - static time_t chkload_time = 0; + static time4_t chkload_time = 0; static int overload = 0; /* overload or banned, update every 1 * sec */ static int banned = 0; |