summaryrefslogtreecommitdiffstats
path: root/mbbsd/record.c
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-24 22:06:48 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2005-01-24 22:06:48 +0800
commit9084d9602e8725a6fb832d4396c12ddd7bb2b7c7 (patch)
tree78d04dab42a50e73845c8e31eb877001fb8379cd /mbbsd/record.c
parentf6324fdcb56a70815842cc39cb1826ce6b82148c (diff)
downloadpttbbs-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/record.c')
-rw-r--r--mbbsd/record.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mbbsd/record.c b/mbbsd/record.c
index 7a5d9c53..05773ef7 100644
--- a/mbbsd/record.c
+++ b/mbbsd/record.c
@@ -211,7 +211,7 @@ static int
force_open(char *fname)
{
int fd;
- time_t expire;
+ time4_t expire;
expire = now - 3600; /* lock 存在超過一個小時就是有問題! */
@@ -464,7 +464,7 @@ int
stampfile(char *fpath, fileheader_t * fh)
{
register char *ip = fpath;
- time_t dtime = COMMON_TIME;
+ time4_t dtime = COMMON_TIME;
struct tm *ptime;
#ifdef _BBS_UTIL_C_
int fp = 0; //Ptt: don't need to check
@@ -488,7 +488,7 @@ stampfile(char *fpath, fileheader_t * fh)
#endif
memset(fh, 0, sizeof(fileheader_t));
strlcpy(fh->filename, ip, sizeof(fh->filename));
- ptime = localtime(&dtime);
+ ptime = localtime4(&dtime);
snprintf(fh->date, sizeof(fh->date),
"%2d/%02d", ptime->tm_mon + 1, ptime->tm_mday);
return 0;
@@ -498,7 +498,7 @@ void
stampdir(char *fpath, fileheader_t * fh)
{
register char *ip = fpath;
- time_t dtime = COMMON_TIME;
+ time4_t dtime = COMMON_TIME;
struct tm *ptime;
if (access(fpath, X_OK | R_OK | W_OK))
@@ -511,7 +511,7 @@ stampdir(char *fpath, fileheader_t * fh)
} while (mkdir(fpath, 0755) == -1);
memset(fh, 0, sizeof(fileheader_t));
strlcpy(fh->filename, ip, sizeof(fh->filename));
- ptime = localtime(&dtime);
+ ptime = localtime4(&dtime);
snprintf(fh->date, sizeof(fh->date),
"%2d/%02d", ptime->tm_mon + 1, ptime->tm_mday);
}
@@ -520,7 +520,7 @@ void
stamplink(char *fpath, fileheader_t * fh)
{
register char *ip = fpath;
- time_t dtime = COMMON_TIME;
+ time4_t dtime = COMMON_TIME;
struct tm *ptime;
if (access(fpath, X_OK | R_OK | W_OK))
@@ -533,7 +533,7 @@ stamplink(char *fpath, fileheader_t * fh)
} while (symlink("temp", fpath) == -1);
memset(fh, 0, sizeof(fileheader_t));
strlcpy(fh->filename, ip, sizeof(fh->filename));
- ptime = localtime(&dtime);
+ ptime = localtime4(&dtime);
snprintf(fh->date, sizeof(fh->date),
"%2d/%02d", ptime->tm_mon + 1, ptime->tm_mday);
}