delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/27/09:51:23

From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Sat, 27 Jan 2001 09:50:59 -0500
MIME-Version: 1.0
Subject: Re: djgpp: djgpp/src/libc/posix/sys/stat/filelen.c
Message-ID: <3A729A03.10142.732D7@localhost>
In-reply-to: <3405-Sat27Jan2001091803+0200-eliz@is.elta.co.il>
References: <200101261823 DOT NAA28562 AT delorie DOT com> (cvs AT delorie DOT com)
X-mailer: Pegasus Mail for Win32 (v3.12c)
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> > !       if ((_farpeekl(_dos_ds, __tb + 0x20) != 0) || (retval == -1))
> >         {
> >           errno = EOVERFLOW;
> > 
> 
> Do we have any evidence that -1 in the transfer buffer means overflow?
> The LFN API docs I have doesn't say anything about that.

The file size in the transfer buffer is unsigned. The file size we return is 
signed. So when the file size is 0xffffffff in the transfer buffer, -1 is 
returned. But we document that -1 is an error and that errno will be set. 
Therefore, a file size of (signed) -1 is an overflow.

Mark

- Raw text -


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