Mail Archives: djgpp-workers/2001/01/31/03:53:02
> > 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
- Raw text -