PR libfortran/62768 Handle filenames with embedded null characters.
authorJanne Blomqvist <jb@gcc.gnu.org>
Tue, 16 Sep 2014 21:40:28 +0000 (00:40 +0300)
committerJanne Blomqvist <jb@gcc.gnu.org>
Tue, 16 Sep 2014 21:40:28 +0000 (00:40 +0300)
commit0e05c303e5c3c7882d5e36a4d5b66f0563ae6478
tree34b3e91356fc23c2feb76d92e78fad28bd83a126
parent7425e424b5222704558591fc6cf26eaa57fb81de
PR libfortran/62768 Handle filenames with embedded null characters.

testsuite ChangeLog:

2014-09-17  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/62768
* gfortran.dg/filename_null.f90: New test.

libgfortran ChangeLog:

2014-09-17  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/62768
* io/io.h (gfc_unit): Store C string for the filename.
* io/close.c (st_close): Use gfc_unit.filename.
* io/inquire.c (inquire_via_unit): Likewise.
* io/open.c (new_unit): Likewise.
(already_open): Likewise, unlink file before freeing filename.
* io/unit.c (init_units): Likewise.
(close_unit_1): Likewise.
(filename_from_unit): Likewise.
* io/unix.c (compare_file_filename): Likewise.
(find_file0): Likewise.
(delete_file): Likewise.

From-SVN: r215307
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/filename_null.f90 [new file with mode: 0644]
libgfortran/ChangeLog
libgfortran/io/close.c
libgfortran/io/inquire.c
libgfortran/io/io.h
libgfortran/io/open.c
libgfortran/io/unit.c
libgfortran/io/unix.c