delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2009/06/19/09:50:22

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
From: "Pierre Muller" <muller AT ics DOT u-strasbg DOT fr>
To: <djgpp-workers AT delorie DOT com>
Subject: [RFA] Fix error in src/libc/compat/stdio/fseeko64.c
Date: Fri, 19 Jun 2009 15:48:55 +0200
Message-ID: <000c01c9f0e4$b0697200$113c5600$@u-strasbg.fr>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Acnw5K7rnT1IJernRU22oLNqMfgfMQ==
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::153]); Fri, 19 Jun 2009 15:48:52 +0200 (CEST)
X-Virus-Scanned: ClamAV 0.94.2/9487/Fri Jun 19 13:23:03 2009 on mr3.u-strasbg.fr
X-Virus-Status: Clean
X-Spam-Status: No, score=-100.0 required=5.0 tests=USER_IN_WHITELIST
autolearn=disabled version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mr3.u-strasbg.fr
Reply-To: djgpp-workers AT delorie DOT com

  I sent a previous message where I told that I found
the reason of my problems when trying to compile binutils
with DJGPP v2.04 from CVS.

  Eli stated that fflush shouldn't handle _IOREAD, and
I finally tried with only one change in fseeko64.
  This solves my problem without change fflush

  The code in ansi/sdtio/fseek.c seems more elaborate
that compat/fseeko64.c, while fseeko.c simply calls
fseek function.
  A cleaner solution might be to copy/translate the whole code
from ansi/stdio/fseek.c

  Anyhow, in the mean time it would be good to commit this;
as it allows to compile DJGPP GDB with libc from CVS.

Pierre Muller
Pascal language support maintainer for GDB


cvs diff: Diffing .
Index: fseeko64.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/libc/compat/stdio/fseeko64.c,v
retrieving revision 1.1
diff -u -p -r1.1 fseeko64.c
--- fseeko64.c  11 Dec 2007 07:48:42 -0000      1.1
+++ fseeko64.c  19 Jun 2009 13:39:02 -0000
@@ -17,6 +17,10 @@ fseeko64(FILE *_stream, off64_t _offset,
   o = llseek(fileno(_stream), _offset, _mode);
   if (o == -1)
     return -1;
+  if (_stream)
+    {
+      _stream->_cnt = 0;
+    }
   return 0;
 }


- Raw text -


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