[Regression, libgfortran] READ from the terminal is stuffed.
Paul Thomas
paulthomas2@wanadoo.fr
Wed Oct 12 10:00:00 GMT 2005
Janne,
>E.g. could you try backing out this part of the patch for unix.c:
>
>
Have done it....
>@@ -394,7 +440,7 @@
> fd_alloc_r_at (unix_stream * s, int *len, gfc_offset where)
> {
> gfc_offset m;
>- int n;
>+ size_t n;
>
> if (where == -1)
> where = s->logical_offset;
>@@ -416,8 +462,8 @@
> if (s->physical_offset != m && lseek (s->fd, m, SEEK_SET) < 0)
> return NULL;
>
>- n = read (s->fd, s->buffer + s->active, s->len - s->active);
>- if (n < 0)
>+ n = s->len - s->active;
>+ if (do_read (s, s->buffer + s->active, &n) != 0)
> return NULL;
>
> s->physical_offset = where + n;
>@@ -502,9 +548,15 @@
> }
>
>
>
...it works.
>If this works consider the patch OK:d from me. The rest of my patch
>should work as before despite this change, as after this the only
>place where do_read() is used is for big unformatted reads, which
>obviously don't suffer from weird interactions with the terminal.
>
>
>
I have checked the terminal read, run the NIST testsuite and it looks as
if it regtests OK.
Will submit this afternoon.
Thanks.
Paul
More information about the Fortran
mailing list