From: Martin Stromberg Message-Id: <200101310852.JAA06693@lws256.lu.erisoft.se> Subject: Re: Bug000323 To: djgpp-workers AT delorie DOT com Date: Wed, 31 Jan 2001 09:52:07 +0100 (MET) In-Reply-To: <200101302214.RAA24294@envy.delorie.com> from "DJ Delorie" at Jan 30, 2001 05:14:00 PM X-Mailer: ELM [version 2.5 PL3] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > > 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. > > @@ -56,7 +57,9 @@ fopen(const char *file, const char *mode > > return NULL; > > > > if (*mode == 'a') > > - lseek(fd, 0, SEEK_END); > > + { > > + f->_flag |= _IOAPPEND; > > + } > > Is this needed? write() would seek there anyway. It would? Why would it do that if _IOAPPEND wasn't set? Right, MartinS