Patch for handling windows files/directories


The attached patch allows clang to handle files/directories properly on windows systems.

clang-win32.patch (4.25 KB)


The patch that I sent is problematic for non-windows systems, sorry about that; new one attached (with better handling of directory separator chars too).

Argiris Kirtzidis wrote:

clang-win32-2.diff (4.25 KB)

Thanks Argiris. I working on integrating this patch. I recognized a while ago that relying on bogus inodes on Windows was not a real solution, so your suggested changes are welcome.

The problem is that we don't want to include any of the platform specific nastiness in FileManager.h. Instead I think we should use a pimpl approach where the platform-specific handling of UniqueDirs/UniqueFiles is hidden within an opaque type. The opaque type is defined within FileManager.cpp (which will include all the platform specific nastiness) but the public interface in FileManager.h will not have special #ifdefs.

I got a little behind today with other things; if you are up to or have time to redo the patch using something like the strategy I just mentioned, please go for it (although I doubt what I said sounded very clear). Otherwise, I'll look into integrating these changes either over the weekend or on Monday.

Thanks again.