True case-sensitive filenames

Chris January
Fri Jan 17 22:26:00 GMT 2003

> The Perl File::Spec thread/rant/whatever on the cygwin list got
> me thinking. To resolve the Windows case-insensitivity problem
> (e.g., "makefile" == "Makefile"), Linda W. seemed to suggest
> creating a new file system driver with a special Cygwin API.
> I don't know if she really meant that or I just misinterpreted
> it, but I got to thinking that something like this must already
> exist for Windows. Sure enough, you can accomplish it using the
> Native API. To see for myself, I created the attached test,
> which creates /cygdrive/c/makefile and /cygdrive/c/Makefile.
> You can even see both files from Cygwin, but when you try to
> access either one, you will always get Makefile (after you
> delete it, you get makefile of course).
> Filenames already are case-sensitive, but the problem is in the
> opening of files under Windows. This is normally done using a
> case-insensitive search. The Native API function allows you to
> choose and actually defaults to using case-sensitive searching.
> Of course, this would only work for Windows NT/2000/XP, but I
> think it should be pretty easy to make fhandler_disk_file use
> case-sensitive searches when opening files. I think this would
> be a big boon for Cygwin, and worth creating slightly different
> behavior between NT/2000/XP and 9x/ME. We could even fall back
> to case-insensitive searching by default, I suppose.

What about FILE_FLAG_POSIX_SEMANTICS or whatever it's called?


More information about the Cygwin-developers mailing list