Date: Wed, 3 Feb 1999 18:50:37 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Stromberg , DJGPP-WORKERS Subject: Re: _llseeks()'s return value In-Reply-To: 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, I wrote: > > 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. I looked, but didn't find anything. You could work around the problem by going all the way back to the beginning of the file from the original position, and then computing the final position on your own, though. The simple-minded way would be to go back one byte at a time until you hit the beginning; a much faster way is to use whatever is returned by lseek as the step size, until you get past the beginning, then compute the size by adding the last (negative) result with the positive steps you did before that. If the above works and isn't too slow, maybe that's the way to go?