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.
This commit is contained in:
parent
5f8989a436
commit
1c35cbcc07
@ -2059,9 +2059,9 @@ CURLcode ftp_perform(struct connectdata *conn,
|
|||||||
struct tm *tm;
|
struct tm *tm;
|
||||||
#ifdef HAVE_LOCALTIME_R
|
#ifdef HAVE_LOCALTIME_R
|
||||||
struct tm buffer;
|
struct tm buffer;
|
||||||
tm = (struct tm *)localtime_r(&data->info.filetime, &buffer);
|
tm = (struct tm *)localtime_r((time_t *)&data->info.filetime, &buffer);
|
||||||
#else
|
#else
|
||||||
tm = localtime(&data->info.filetime);
|
tm = localtime((time_t *)&data->info.filetime);
|
||||||
#endif
|
#endif
|
||||||
/* format: "Tue, 15 Nov 1994 12:45:26 GMT" */
|
/* 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",
|
strftime(buf, BUFSIZE-1, "Last-Modified: %a, %d %b %Y %H:%M:%S GMT\r\n",
|
||||||
|
@ -548,8 +548,10 @@ struct connectdata {
|
|||||||
struct PureInfo {
|
struct PureInfo {
|
||||||
int httpcode;
|
int httpcode;
|
||||||
int httpversion;
|
int httpversion;
|
||||||
time_t filetime; /* If requested, this is might get set. Set to -1 if
|
long filetime; /* If requested, this is might get set. Set to -1 if the time
|
||||||
the time was unretrievable */
|
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 header_size; /* size of read header(s) in bytes */
|
||||||
long request_size; /* the amount of bytes sent in the request(s) */
|
long request_size; /* the amount of bytes sent in the request(s) */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user