aboutsummaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-12-13 10:25:26 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-12-13 10:25:26 +0000
commit344c6a37250e4905ec60974bbec82842a5c96c9b (patch)
treed93cc5c29b085043e82e657e41d49709b1dbfe35 /lib/file.c
parentf966dad30673d44658aaa9f34e820fe3231b2166 (diff)
Gisle's fix for resuming large file:// files on windows - slightly edited
by me.
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/file.c b/lib/file.c
index 0f448934b..6b2bbd161 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -169,6 +169,10 @@ CURLcode Curl_file_connect(struct connectdata *conn)
#if defined(WIN32) && (SIZEOF_CURL_OFF_T > 4)
#define lseek(x,y,z) _lseeki64(x, y, z)
+#define struct_stat struct _stati64
+#define fstat(fd,st) _fstati64(fd,st)
+#else
+#define struct_stat struct stat
#endif
CURLcode Curl_file_done(struct connectdata *conn,
@@ -278,7 +282,9 @@ CURLcode Curl_file(struct connectdata *conn)
(via NFS, Samba, NT sharing) can be accessed through a file:// URL
*/
CURLcode res = CURLE_OK;
- struct stat statbuf;
+ struct_stat statbuf; /* struct_stat instead of struct stat just to allow the
+ Windows version to have a different struct without
+ having to redefine the simple word 'stat' */
curl_off_t expected_size=0;
bool fstated=FALSE;
ssize_t nread;