delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/07/03/02:11:07

Date: Mon, 3 Jul 2000 09:10:26 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: April <awhite AT user DOT rose DOT com>
cc: djgpp AT delorie DOT com
Subject: Re: ftruncate function
In-Reply-To: <395FD105.832B3B@user.rose.com>
Message-ID: <Pine.SUN.3.91.1000703091005.20850B-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 2 Jul 2000, April wrote:

> > Please post a short test program that could be compiled and used to
> 
> For the second call to ftruncate(), redefine MY_MAX.  My HD has 320MB
> free, so it should fail at 400

Looks like a bug in `ftruncate': its algorithm is not suitable for
extending files, because DOS doesn't return an error indication when
zero bytes are written to a file.  In addition, `ftruncate' should
extend the file with zeroes, which it doesn't currently do.

Thanks for reporting this.  I think these problems are easy to fix, so
if you feel like working on this, please do so, and please consider
submitting the patches for inclusion in a future DJGPP version.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019