aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-07-30 07:22:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-07-30 07:22:28 +0000
commit1c35cbcc07f89913ed1025c05ab3dbd8683b7f01 (patch)
treece9241aa139c2bc0336fbc860ced850fa67a0294 /lib
parent5f8989a436b508faf0b439778f1e05550a7b363d (diff)
Reverted the 'filetime' struct field back to a 'long' as time_t is sometimes
unsigned and we want this to be able to hold -1 for illegal/unset values.
Diffstat (limited to 'lib')
-rw-r--r--lib/ftp.c4
-rw-r--r--lib/urldata.h6
2 files changed, 6 insertions, 4 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index 3d8f4d314..3cbaf663d 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -2059,9 +2059,9 @@ CURLcode ftp_perform(struct connectdata *conn,
struct tm *tm;
#ifdef HAVE_LOCALTIME_R
struct tm buffer;
- tm = (struct tm *)localtime_r(&data->info.filetime, &buffer);
+ tm = (struct tm *)localtime_r((time_t *)&data->info.filetime, &buffer);
#else
- tm = localtime(&data->info.filetime);
+ tm = localtime((time_t *)&data->info.filetime);
#endif
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
diff --git a/lib/urldata.h b/lib/urldata.h
index 3318b7f57..165b90fe1 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -548,8 +548,10 @@ struct connectdata {
struct PureInfo {
int httpcode;
int httpversion;
- time_t filetime; /* If requested, this is might get set. Set to -1 if
- the time was unretrievable */
+ long filetime; /* If requested, this is might get set. Set to -1 if the time
+ was unretrievable. We cannot have this of type time_t,
+ since time_t is unsigned on several platforms such as
+ OpenVMS. */
long header_size; /* size of read header(s) in bytes */
long request_size; /* the amount of bytes sent in the request(s) */