aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.h
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2013-04-29 11:42:00 +0300
committerJanne Blomqvist <jb@gcc.gnu.org>2013-04-29 11:42:00 +0300
commitc033f5ae3270e34c40c7ef9e7168b9884e39b75a (patch)
tree3b1ca6b7cea4c26f9fb00330df1afd202ff6a6cb /libgfortran/io/unix.h
parent94dc53320e6c22ef0d3f8d8db83c2492de001f5b (diff)
downloadgcc-c033f5ae3270e34c40c7ef9e7168b9884e39b75a.zip
gcc-c033f5ae3270e34c40c7ef9e7168b9884e39b75a.tar.gz
gcc-c033f5ae3270e34c40c7ef9e7168b9884e39b75a.tar.bz2
PR 56981 Improve unbuffered performance on special files.
2013-04-29 Janne Blomqvist <jb@gcc.gnu.org> 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. From-SVN: r198390
Diffstat (limited to 'libgfortran/io/unix.h')
-rw-r--r--libgfortran/io/unix.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libgfortran/io/unix.h b/libgfortran/io/unix.h
index bf59a8e..cc82d45 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);