delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/11/15:12:41

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200102112012.VAA19133@father.ludd.luth.se>
Subject: Re: Bug000323
In-Reply-To: <8011-Thu01Feb2001231104+0200-eliz@is.elta.co.il> from Eli Zaretskii at "Feb 1, 2001 11:11:05 pm"
To: djgpp-workers AT delorie DOT com
Date: Sun, 11 Feb 2001 21:12:32 +0100 (MET)
X-Mailer: ELM [version 2.4ME+ PL54 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

According to Eli Zaretskii:
> > Well, I'm having a troubles looking at what flags are set. But if you
> > try the test program in test/libc/ansi/stdio/append.c with and without
> > this part you'll see the difference.
> 
> Ah, I see why.  The test program prints a very short string and then
> closes the file.  So the entire text is buffered inside the FILE
> object when fclose is called, and it is up to fclose to flush it.
> fclose calls fflush, but fflush doesn't go through _fslbuf, it calls
> _write directly.  (I don't remember why, but it probably has a good
> reason.)
> 
> Solution: add llseek to fflush, and you solved two problems: no need
> for llseek in _doprnt, and a bug with writing the last portion of the
> data from fflush is also squashed ;-)

Ok. I found the bug. Now it works without changing fflush(). Should
that part still be added you think?


Right,

						MartinS

- Raw text -


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