This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: FreeBSD Fortran Failure
On May 13, 2001, Mark Mitchell <mark@codesourcery.com> wrote:
> I think that the reason for this might be that GETC is defined in
> terms of stdio, and ftruncate operates on file descriptors. So, if
> the stdio buffer isn't flushed by the call to ftruncate, there could
> still appear to be characters present. Is that possible?
Good point. We should probably fflush the FILE* before ftruncate, and
try to do something about cleaning up its buffers afterwards (fseek to
the current position, perhaps?)
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me