delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/01/31/16:10:57

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200101312110.WAA04560@father.ludd.luth.se>
Subject: Re: Bug000323
In-Reply-To: <Pine.SUN.3.91.1010131110650.29266c-100000@is> from Eli Zaretskii at "Jan 31, 2001 11:11:35 am"
To: djgpp-workers AT delorie DOT com
Date: Wed, 31 Jan 2001 22:10:34 +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:
> 
> On Wed, 31 Jan 2001, Martin Stromberg wrote:
> 
> > > > Index: src/libc/ansi/stdio/doprnt.c
> > > > +
> > > > +  if (fp->_flag & _IOAPPEND)
> > > > +  {
> > > > +    if ( llseek(fileno(fp), 0, SEEK_END) == -1 )
> > > > +    {
> > > > +      return (EOF);
> > > > +    }
> > > > +  }
> > > 
> > > This shouldn't be needed; the flsbuf() call should move to EOF.
> > 
> > Well, I tried without it and it didn't work.
> 
> Are you sure you tried this with a handle which had _IOAPPEND flag set, 
> and with _flsbuf doing the Right Thing with _IOAPPEND?
> 
> I don't see how could this not work, since _doprnt always calls putc to 
> output the text, and putc always calls _flsbuf.

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.

Any further insights are welcome!


Right,

						MartinS

- Raw text -


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