Date: Wed, 3 Feb 1999 17:21:38 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Stromberg cc: DJGPP-WORKERS Subject: Re: _llseeks()'s return value In-Reply-To: <199902031453.PAA19941@juno.erisoft.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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.