Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com From: "Chris January" To: "Cygwin-Developers AT Cygwin DOT Com" Subject: RE: True case-sensitive filenames Date: Fri, 17 Jan 2003 22:26:03 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 In-Reply-To: Importance: Normal > 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? Chris