gcc/libgfortran/io
Janne Blomqvist b923394429 PR 67585 Handle EINTR
Many POSIX systems have the bad habit of not restarting interrupted
syscalls. On these systems it's up to the user to check for an error
with errno == EINTR and restart manually. This patch does this for
libgfortran, so that GFortran users don't have to do it.

2016-10-09  Janne Blomqvist  <jb@gcc.gnu.org>

        PR libfortran/67585
        * io/io.h: TEMP_FAILURE_RETRY: Define macro if not found.
        * io/unix.c (raw_read): Handle EINTR.
        (raw_write): Check for return value -1.
        (raw_seek): Handle EINTR.
        (raw_tell): Likewise.
        (raw_size): Likewise.
        (raw_truncate): Likewise.
        (raw_close): Likewise.
        (buf_flush): Call raw_seek instead of lseek.
        (buf_read): Likewise.
        (buf_write): Likewise.
        (fd_to_stream): Handle EINTR.
        (tempfile_open): Likewise.
        (regular_file2): Likewise.
        (compare_file_filename): Likewise.
        (find_file): Likewise.
        (inquire_sequential): Likewise.
        (inquire_direct): Likewise.
        (inquire_formatted): Likewise.

From-SVN: r240902
2016-10-09 21:05:56 +03:00
..
close.c Update copyright years. 2016-01-04 15:30:50 +01:00
fbuf.c Update copyright years. 2016-01-04 15:30:50 +01:00
fbuf.h Update copyright years. 2016-01-04 15:30:50 +01:00
file_pos.c Update copyright years. 2016-01-04 15:30:50 +01:00
format.c [multiple changes] 2016-08-31 05:36:22 +00:00
format.h [multiple changes] 2016-08-31 05:36:22 +00:00
inquire.c re PR libfortran/77868 (Fail to NULL guard check for internal unit in inquire_via_unit) 2016-10-05 16:32:24 +00:00
intrinsics.c Update copyright years. 2016-01-04 15:30:50 +01:00
io.h PR 67585 Handle EINTR 2016-10-09 21:05:56 +03:00
list_read.c re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO)) 2016-09-23 20:36:21 +00:00
lock.c Update copyright years. 2016-01-04 15:30:50 +01:00
open.c re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO)) 2016-09-23 20:36:21 +00:00
read.c Update copyright years. 2016-01-04 15:30:50 +01:00
size_from_kind.c Update copyright years. 2016-01-04 15:30:50 +01:00
transfer.c re PR fortran/77707 (formatted direct access: nextrec off by one) 2016-09-28 19:38:03 +00:00
transfer128.c Update copyright years. 2016-01-04 15:30:50 +01:00
unit.c re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO)) 2016-09-23 20:36:21 +00:00
unix.c PR 67585 Handle EINTR 2016-10-09 21:05:56 +03:00
unix.h Update copyright years. 2016-01-04 15:30:50 +01:00
write.c re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0) 2016-08-31 17:45:26 +00:00
write_float.def re PR libfortran/77393 (Revision r237735 changed the behavior of F0.0) 2016-09-06 23:22:26 +00:00