diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-05 22:29:29 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-05 22:29:29 +0000 |
commit | b60e0fa97ed7ddc66d0ad6d00dfd78319bb6ad36 (patch) | |
tree | 50a5aed5fe1754b59f331e8c4337c8301121e1c7 /lib/file.c | |
parent | 41c6f68d949bf6021fbf4d3488bbf38efa898816 (diff) |
David J Meyer's large file support.
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/file.c b/lib/file.c index 99310ccea..ca30582dd 100644 --- a/lib/file.c +++ b/lib/file.c @@ -163,12 +163,12 @@ CURLcode Curl_file(struct connectdata *conn) */ CURLcode res = CURLE_OK; struct stat statbuf; - unsigned long expected_size=0; + off_t expected_size=0; bool fstated=FALSE; ssize_t nread; struct SessionHandle *data = conn->data; char *buf = data->state.buffer; - int bytecount = 0; + off_t bytecount = 0; struct timeval start = Curl_tvnow(); struct timeval now = start; int fd; @@ -188,7 +188,7 @@ CURLcode Curl_file(struct connectdata *conn) date. */ if(data->set.no_body && data->set.include_header && fstated) { CURLcode result; - sprintf(buf, "Content-Length: %lu\r\n", expected_size); + sprintf(buf, "Content-Length: %Od\r\n", expected_size); result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0); if(result) return result; @@ -217,7 +217,7 @@ CURLcode Curl_file(struct connectdata *conn) } /* Added by Dolbneff A.V & Spiridonoff A.V */ - if (conn->resume_from <= (long)expected_size) + if (conn->resume_from <= expected_size) expected_size -= conn->resume_from; else /* Is this error code suitable in such situation? */ |