diff options
author | Janne Blomqvist <jblomqvi@cc.hut.fi> | 2005-10-12 22:54:59 +0300 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2005-10-12 19:54:59 +0000 |
commit | 4def9c5307aa70afe92896aa4e2e4f350df4ae74 (patch) | |
tree | 946205e270ed3be183176e0e152e2858d3d475fa /libgfortran | |
parent | 9f92185eb90aeeba65acd23587eca22a45d6a3e7 (diff) | |
download | gcc-4def9c5307aa70afe92896aa4e2e4f350df4ae74.zip gcc-4def9c5307aa70afe92896aa4e2e4f350df4ae74.tar.gz gcc-4def9c5307aa70afe92896aa4e2e4f350df4ae74.tar.bz2 |
unix.c: Remove parts of patch of 2005/10/07 that cause input from the terminal to hang.
2005-10-12 Janne Blomqvist <jblomqvi@cc.hut.fi>
* io/unix.c: Remove parts of patch of 2005/10/07 that cause
input from the terminal to hang.
From-SVN: r105324
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/io/unix.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index cca3bbe..3407289 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2005-10-12 Janne Blomqvist <jblomqvi@cc.hut.fi> + + * io/unix.c: Remove parts of patch of 2005/10/07 that cause + input from the terminal to hang. + 2005-10-11 Steven G. Kargl <kargls@comcast.net> PR libgfortran/24313 diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c index 6fe861c..de018af 100644 --- a/libgfortran/io/unix.c +++ b/libgfortran/io/unix.c @@ -440,7 +440,7 @@ static char * fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where) { gfc_offset m; - size_t n; + int n; if (where == -1) where = s->logical_offset; @@ -462,8 +462,8 @@ fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where) if (s->physical_offset != m && lseek (s->fd, m, SEEK_SET) < 0) return NULL; - n = s->len - s->active; - if (do_read (s, s->buffer + s->active, &n) != 0) + n = read (s->fd, s->buffer + s->active, s->len - s->active); + if (n < 0) return NULL; s->physical_offset = where + n; |