www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/03/10:39:20

Date: Wed, 3 Feb 1999 17:21:38 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Stromberg <eplmst AT lu DOT erisoft DOT se>
cc: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Subject: Re: _llseeks()'s return value
In-Reply-To: <199902031453.PAA19941@juno.erisoft.se>
Message-ID: <Pine.SUN.3.91.990203171810.14316C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

On Wed, 3 Feb 1999, Martin Stromberg wrote:

> > Seeking from current position *will* work, but the return value won't be 
> > correct when the resultant position is beyond 2GB.  This is DOS bug, 
> > so just document it and continue.
> 
> Oh, I was just thinking that instead of returning a bogus value, we
> should return fail as I thought one important use of seek from the
> current position zero steps was having it return the current
> postition. (Hence, not support seeking from current postion at all.) 

You could set errno to ENOSYS, say, to indicate that.  Not supporting 
seeking from current position seems to be too much: somebody might need 
to seek but not care about return value.  Those who do care will 
presumably read the docs and use SEEK_SET or SEEK_END.

(This means that `fstat' needs to know about this lossage, and handle it 
somehow, btw.)

> Somebody doesn't happen to know some interrupt for seeking that
> returns valid data on file positions bigger than 2^31?

I will try to search my references.

- Raw text -


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