curl-users
RE: ftruncate() on Windows?
Date: Thu, 28 Oct 2004 11:00:04 +0100
Daniel
int _chsize(
int handle,
long size
);
Would seem to do what you need.
Regards
Mick
-----Original Message-----
From: curl-users-bounces_at_cool.haxx.se on behalf of Daniel Stenberg
Sent: Thu 28/10/2004 08:30
To: curl-users_at_cool.haxx.se
Cc:
Subject: ftruncate() on Windows?
Hi
It seems ftruncate() is not available on Windows, and thus my new --retry code
make the Windows build fail.
Does anyone know what alternative function I can use on Windows?
--- snip ---
NAME
truncate, ftruncate - truncate a file to a specified length
SYNOPSIS
#include <unistd.h>
#include <sys/types.h>
int truncate(const char *path, off_t length);
int ftruncate(int fd, off_t length);
DESCRIPTION
The truncate and ftruncate functions cause the regular file named by
path or referenced by fd to be truncated to a size of precisely length
bytes.
--- snip ---
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.html
- application/ms-tnef attachment: winmail.dat