[libgfortran,patch] Fix "inquire by filename" for mingw

François-Xavier Coudert fxcoudert@gmail.com
Fri Sep 7 19:58:00 GMT 2007


On Windows, functions of the stat() family don't return inode numbers.
libgfortran currently uses inode numbers to uniquely identify files
(used in the "inquire by filename" functionality), and in the case
where inode numbers aren't accessible, it simply compares filenames.
This last strategy doesn't work because we don't see that my_file and
foo/../my_file are the same file, for example.

This patch uses Windows-specific functions (protected by #ifdef
__MINGW32__) to uniquely identify files. In the case where this fails
(happens on FAT and network filesystems), it will still resort to
compare filenames.

Built and tested on i386-pc-mingw32 and x86_64-linux. OK to commit?

FX



:ADDPATCH libgfortran:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr23272.ChangeLog
Type: application/octet-stream
Size: 362 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070907/eea57d7c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr23272.diff
Type: application/octet-stream
Size: 4491 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070907/eea57d7c/attachment-0001.obj>


More information about the Gcc-patches mailing list