2005-10-07 Janne Blomqvist <jblomqvi@cc.hut.fi>
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Oct 2005 20:02:28 +0000 (20:02 +0000)
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 7 Oct 2005 20:02:28 +0000 (20:02 +0000)
commitb2a112caa23df1ee94dea7ece1c57648ce08d11d
tree644a90d57f7546595ef3507a66c957fd39ef1765
parent0d442ac4f4f823c146020fb3eaf588828dcd8f95
2005-10-07  Janne Blomqvist <jblomqvi@cc.hut.fi>

PR fortran/16339
PR fortran/23363
* io/io.h: Add read and write members to stream, define access
macros.
* io/transfer.c (read_block_direct): New function.
(write_block_direct): New function.
(unformatted_read): Change to use read_block_direct.
(unformatted_write): Change to use write_block_direct.
* io/unix.c: Remove mmap includes and defines.
(writen): Remove.
(readn): Remove.
(reset_stream): New function.
(do_read): New function.
(do_write): New function.
(fd_flush): Change to use do_write() instead of writen().
(fd_alloc_r_at): Change to use do_read().
(fd_seek): Change return type to try, as the prototype. Add check
to avoid syscall overhead if possible.
(fd_read): New function.
(fd_write): New function.
(fd_open): Set pointers for new functions.
(mem_read): New function.
(mem_write): New function.
(open_internal): Set pointers for new functions.
(is_seekable): Clean up comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105101 138bc75d-0d04-0410-961f-82ee72b054a4
libgfortran/ChangeLog
libgfortran/io/io.h
libgfortran/io/transfer.c
libgfortran/io/unix.c