From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Possibly bug in fseek() Date: Wed, 02 Jul 1997 16:53:49 -0400 Organization: Cornell University http://www.cornell.edu Lines: 43 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <33BABFDD.2E2F@cornell.edu> References: <5pb9t9$1if$1 AT news-hrz DOT uni-duisburg DOT de> <33B96225 DOT 7E4F AT cornell DOT edu> <5pdf4q$bmj$1 AT news-hrz DOT uni-duisburg DOT de> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: cu-dialup-0090.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Michael Mauch wrote: On Tue, 01 Jul 1997 16:01:41 -0400, "A. Sinan Unur" wrote: >> this is what the ANSI standard says (according to an excerpt on p.249 >> of Plauger's "The Standard C Library") >> A binary stream need not meaningfully support fseek calls with a >> whence value of SEEK_END. > > So, given that the DJGPP implementation of binary streams does "not > meaningfully support fseek", shouldn't fseek() then always fail for > this "request that cannot be satisfied", i.e. using SEEK_END on binary > streams? nobody said that djgpp did not support SEEK_END meaningfully. i was just pointing out a potential portability problem with your code. >> The fseek function returns nonzero only for a request that cannot be >> satisfied. >> compare the first line of your post with this information. > > Hmm, you don't mean the "Hi!", do you? ;-) no. i meant the line where you wrote: fseek() in DJGPP v2.01 seems to have a bug: it returns 0 for success when it should not: basically, you need to have a clearer understanding of what you want to do, what fseek can portably do and what fseek provided by djgpp actually does before saying you have found a bug. -- Sinan ******************************************************************* A. Sinan Unur WWWWWW |--O+O mailto:sinan DOT unur AT cornell DOT edu C ^ http://www.people.cornell.edu/pages/asu1/ \ ~/ Unsolicited e-mail is _not_ welcome, and will be billed for. *******************************************************************