delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/01/16/04:27:54

Date: Sun, 16 Jan 2000 10:49:39 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Stromberg <Martin DOT Stromberg AT lu DOT erisoft DOT se>
cc: djgpp-workers AT delorie DOT com
Subject: Re: _lleek
In-Reply-To: <200001130902.KAA13971@spica-144.lu.erisoft.se>
Message-ID: <Pine.SUN.3.91.1000116104913.11666Y-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 13 Jan 100, Martin Stromberg wrote:

> The problem is that the INT21 call registers used for offset (input
> and output) is totally only 32 bits, so we have this mapping: 
> register contents -> offset
> 0			0
> .			.
> .			.
> .			.
> 2^32-2			2^32-2
> 2^32-1			-1 (failure)
> 
> So my tests showed calling lseek(fd, -2, SEEK_SET) would result in the
> file growing to maxsize (as if lseek(fd, 2^32-2 , SEEK_SET) was
> called). Please try this and verify my findings, if possible.

Unfortunately, I don't have any access to a system with FAT32 volumes
(FAT32 considerably slows down disk I/O, so I routinely refuse
Windows's suggestion to convert).

So, if I understand correctly, you are suggesting to implement lseek
of -2 as lseek of -3 followed by lseek of +1, is that right?

- Raw text -


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