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]

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


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:

Attachment: pr23272.ChangeLog
Description: Binary data

Attachment: pr23272.diff
Description: Binary data


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