Date: Thu, 1 Feb 2001 13:25:08 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Str|mberg cc: djgpp-workers AT delorie DOT com Subject: Re: Bug000323 In-Reply-To: <200101312110.WAA04560@father.ludd.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On Wed, 31 Jan 2001, Martin Str|mberg wrote: > > > > > + > > > > > + 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. Could you please post the diffs for flsbuf.c again? I didn't save that at the time, and I cannot find it in mail-archives, for some reason.