This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
E.g. could you try backing out this part of the patch for unix.c:Have done it....
...it works.@@ -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 @@ }
I have checked the terminal read, run the NIST testsuite and it looks as if it regtests OK.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.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |