aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2004-11-24 19:34:25 +0000
committerGisle Vanem <gvanem@broadpark.no>2004-11-24 19:34:25 +0000
commit56c989983288c3c228f997651ba6e164f4c048e2 (patch)
tree5bdcbe32364bd82c0aa7b1ca2002dc3e21926c2b
parent7b3fba1ad5bbfd7c6466aa54dc1a601e124d225c (diff)
Provide a 64-bit capable ftruncate(). MingW has one, but
it takes only 32-bit offsets.
-rw-r--r--src/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index f7431b4d1..2dc53b1bc 100644
--- a/src/main.c
+++ b/src/main.c
@@ -214,7 +214,7 @@ char *strdup(char *str)
#include "curlmsg_vms.h"
#endif
-#if !defined(HAVE_FTRUNCATE) && defined(WIN32)
+#ifdef WIN32
/*
* Truncate a file handle at a 64-bit position 'where'.
* Borland doesn't even support 64-bit types.
@@ -223,7 +223,7 @@ char *strdup(char *str)
#define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
#endif
-static int ftruncate (int fd, curl_off_t where)
+static int ftruncate64 (int fd, curl_off_t where)
{
curl_off_t curr;
int rc = 0;
@@ -239,6 +239,7 @@ static int ftruncate (int fd, curl_off_t where)
_lseeki64(fd, curr, SEEK_SET);
return rc;
}
+#define ftruncate(fd,where) ftruncate64(fd,where)
#endif
/*