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]

Re: [patch, libgfortran] PR31052 Bad IOSTAT values when readings NAMELISTs past EOF


:REVIEWMAIL:

2007-03-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>

PR libgfortran/31052
* io/file_position (st_rewind): Fix comments. Remove use of
test_endfile. Don't seek if already at 0 position. Use new is_special
function to set endfile state.
* io/open.c (test_endfile): Delete this function.
* io/io.h: Delete prototype for test_endfile. Add prototype
for is_special.
* io/unix.c (is_special): New function. Fix whitespace.
* io/transfer.c (next_record_r): Remove use of test_endfile.

This patch is OK if you can confirm that you reviewed and tested that it doesn't affect badly the behaviour for special files other than / dev/null.


On a more general note, looking at the code in libgfortran/io/unix.c, I think we're starting to use special_file to represent too many things (/dev/null, terminals, ...) Maybe we should have a few separate attributes, like
unsigned special_file:1;
unsigned tty:1;
unsigned seekable_special:1;


Anyway, you and Thomas K. are certainly our I/O experts here, so I'd appreciate your opinion on this ranting of mine, unrelatedly to you commiting the patch if or when you have it tested on different special files.

Thanks,
FX


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]