delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/10/21/17:30:50

Date: Thu, 21 Oct 1999 17:01:03 -0400
Message-Id: <199910212101.RAA06252@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <380EB83B.D9BB7F9@tudor21.net> (message from Richard Dawe on Thu,
21 Oct 1999 07:52:43 +0100)
Subject: Re: Bug in fsetpos()?
References: <380EB83B DOT D9BB7F9 AT tudor21 DOT net>
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I was looking at fseek(), fgetpos(), fsetpos() earlier and I noticed
> that fsetpos() appears to ignore the return value of fseek(). Is
> this intended?  If not, there's a patch below to fix it. I also
> altered the return value to be -1, to be consistent with fseek(). If
> this is the intended behaviour, may I ask why?

Linux says:

RETURN VALUES
       The rewind function returns no value.  Upon successful
       completion, fgetpos, fseek, fsetpos return 0, and ftell returns
       the current offset.  Otherwise, -1 is returned and the global
       variable errno is set to indicate the error.

IRIX says:

DIAGNOSTICS
     If successful, both fsetpos and fgetpos return zero.  On failure,
     they return non-zero and set errno to indicate the error.

- Raw text -


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