cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Bug report: curl win32 ftruncate64 not working correctly.

From: Yang Tse <yangsita_at_gmail.com>
Date: Fri, 14 Dec 2007 17:49:14 +0100

> static int ftruncate64 (int fd, curl_off_t where)
> {
> if (_lseeki64(fd, where, SEEK_SET) < 0)
> return -1;
>
> if (!SetEndOfFile((HANDLE)_get_osfhandle(fd)))
> return -1;
>
> return 0;
> }

I agree with this.

Attached patch also defines HAVE_FTRUNCATE for WIN32 so that
ftruncate64() is actually used.

Please verify if it is ok for you.

If you give us your full name, credit will go to you when commiting
this bug fix.

-- 
-=[Yang]=-

Received on 2007-12-14