www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/10/11/15:59:19

Sender: rich AT phekda DOT freeserve DOT co DOT uk
Message-ID: <3BC5F4AF.A9459A35@phekda.freeserve.co.uk>
Date: Thu, 11 Oct 2001 20:36:15 +0100
From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: Resend: DJGPP and files > 2GB
References: <200110110719 DOT JAA23930 AT lws256 DOT lu DOT erisoft DOT se>
Reply-To: djgpp-workers AT delorie DOT com

Martin Stromberg wrote:
> 
> Richard said:
[snip]
> > off_t does not allow us to handle the full extent of files > 2GB in
> > size, because off_t is too small right now. Hence this thread.
> 
> No. You don't get it. It the same exercise again. You pass in the
> negative number and it doesn't matter. It will seek to the right
> place.

I'm not convinced by your argument. Consider relative seeks:

lseek(fd, SEEK_SET, 2GB - 10);
lseek(fd, SEEK_CUR, 1GB);

Now I want to seek backwards 2.5GB. How would I do that? How does lseek
know which direction I want to go for relative seeks with |offset| > 2GB?

Incidentally, why does lseek check whether the file descriptor is a pipe
or not, after it's done the INT21h call? Shouldn't it do it before the
interrupt?

Thanks, bye, Rich =]

-- 
Richard Dawe
http://www.phekda.freeserve.co.uk/richdawe/

- Raw text -


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