From fe34985d32867e215a69fa049d9eade1ae33df57 Mon Sep 17 00:00:00 2001 From: jb Date: Mon, 29 Apr 2013 08:42:00 +0000 Subject: PR 56981 Improve unbuffered performance on special files. 2013-04-29 Janne Blomqvist PR fortran/56981 * io/transfer.c (next_record_w_unf): First fix head marker, then write tail. (next_record): Call flush_if_unbuffered. * io/unix.c (struct unix_stream): Add field unbuffered. (flush_if_unbuffered): New function. (fd_to_stream): New argument. (open_external): Fix fd_to_stream call. (input_stream): Likewise. (output_stream): Likewise. (error_stream): Likewise. * io/unix.h (flush_if_unbuffered): New prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198390 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgfortran/io/unix.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libgfortran/io/unix.h') diff --git a/libgfortran/io/unix.h b/libgfortran/io/unix.h index bf59a8ee1fc..cc82d457397 100644 --- a/libgfortran/io/unix.h +++ b/libgfortran/io/unix.h @@ -167,6 +167,9 @@ internal_proto(inquire_readwrite); extern void flush_if_preconnected (stream *); internal_proto(flush_if_preconnected); +extern int flush_if_unbuffered (stream*); +internal_proto(flush_if_unbuffered); + extern int stream_isatty (stream *); internal_proto(stream_isatty); -- cgit v1.2.1