|
|
2edfb0e |
From nobody Mon Sep 17 00:00:00 2001
|
|
|
2edfb0e |
From: Paul P Komkoff Jr <i@stingr.net>
|
|
|
2edfb0e |
Date: Sat, 10 Jun 2006 20:55:20 +0400
|
|
|
2edfb0e |
Subject: [PATCH 5/8] Fix breakage on 64bit platforms.
|
|
|
2edfb0e |
|
|
|
2edfb0e |
Due to variable size differences it is nesessary to create temporary
|
|
|
2edfb0e |
variable of type time_t to hold the time.
|
|
|
2edfb0e |
|
|
|
2edfb0e |
---
|
|
|
2edfb0e |
|
|
|
2edfb0e |
lib/ftfile.c | 8 +++++---
|
|
|
2edfb0e |
1 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
2edfb0e |
|
|
|
2edfb0e |
bc0750fd6719d64377e578373ad4325e1440eb6a
|
|
|
2edfb0e |
diff --git a/lib/ftfile.c b/lib/ftfile.c
|
|
|
2edfb0e |
index f25e849..ec17771 100644
|
|
|
2edfb0e |
--- a/lib/ftfile.c
|
|
|
2edfb0e |
+++ b/lib/ftfile.c
|
|
|
2edfb0e |
@@ -413,16 +413,17 @@ void ftfile_pathname(char *buf, int bsiz
|
|
|
3eeb44a |
int done, u_int32 ftime)
|
|
|
3eeb44a |
{
|
|
|
3eeb44a |
struct tm *tm;
|
|
|
3eeb44a |
+ time_t _t = (time_t) ftime;
|
|
|
3eeb44a |
char *prefix, dbuf[64];
|
|
|
3eeb44a |
long gmt_val;
|
|
|
3eeb44a |
char gmt_sign;
|
|
|
3eeb44a |
int tm_gmtoff;
|
|
|
3eeb44a |
|
|
|
3eeb44a |
- if (!(tm = localtime ((time_t*)&ftime))) {
|
|
|
3eeb44a |
+ if (!(tm = localtime (&_t))) {
|
|
|
3eeb44a |
snprintf(buf, bsize, ".");
|
|
|
3eeb44a |
}
|
|
|
3eeb44a |
|
|
|
3eeb44a |
- tm_gmtoff = get_gmtoff(ftime);
|
|
|
3eeb44a |
+ tm_gmtoff = get_gmtoff(_t);
|
|
|
3eeb44a |
|
|
|
3eeb44a |
/* compute GMT offset */
|
|
|
3eeb44a |
if (tm_gmtoff >= 0) {
|
|
|
2edfb0e |
@@ -502,6 +503,7 @@ void ftfile_pathname(char *buf, int bsiz
|
|
|
3eeb44a |
int ftfile_mkpath(u_int32 ftime, int nest)
|
|
|
3eeb44a |
{
|
|
|
3eeb44a |
struct tm *tm;
|
|
|
3eeb44a |
+ time_t _t = (time_t) ftime;
|
|
|
3eeb44a |
char buf[32];
|
|
|
3eeb44a |
|
|
|
3eeb44a |
/* no directories */
|
|
|
2edfb0e |
@@ -512,7 +514,7 @@ int ftfile_mkpath(u_int32 ftime, int nes
|
|
|
3eeb44a |
if ((nest > 3) || (nest < -3))
|
|
|
3eeb44a |
return -1;
|
|
|
3eeb44a |
|
|
|
3eeb44a |
- if (!(tm = localtime ((time_t*)&ftime)))
|
|
|
3eeb44a |
+ if (!(tm = localtime (&_t)))
|
|
|
3eeb44a |
return -1;
|
|
|
3eeb44a |
|
|
|
3eeb44a |
if (nest == -1)
|
|
|
2edfb0e |
--
|
|
|
2edfb0e |
1.3.3
|
|
|
2edfb0e |
|