X-Spam-Check-By: sourceware.org Message-ID: <46AE88DF.5F5B7CBB@dessent.net> Date: Mon, 30 Jul 2007 17:57:03 -0700 From: Brian Dessent X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: ntfs ObCaseInsensitive & cygwin? References: <20070731000653 DOT GA1092 AT ednor DOT casa DOT cgf DOT cx> <46AE856D DOT 8040706 AT read DOT org DOT nz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Morgan Read wrote: > > Sorry but there are too many strcasecmp's sprinkled throughout cygwin's > > code to feel confident that it would work well at all. > > Huh, you mean cygwin's been written not to take advantage of a case > sensitive file system even where it exists!? I don't think you understand how this works. In order for an app to take advantage of case sensitivity in NTFS, it has to avoid the Win32 subsystem entirely, because it is the Win32 API which imposes this limitation. That means either using the Native API for everything, or using a different subsystem (such as the POSIX subsystem.) The problem with the former is that the native API is almost entirely undocumented, and does not even exist on non-NT platforms. Until recently Cygwin had to maintain 9x/ME compatibility which meant that even if it did use the Native API for something it still had to provide a version that also used the Win32 API to do the same thing. The problem with the latter is that one subsystem cannot interact with another, i.e. a POSIX DLL cannot use/load any functions a Win32 DLL at all, they are completely separated from each other, which makes it significantly less useful. And besides, part of the whole philosophy of Cygwin is that it is a standard Win32 DLL, *not* having anything to do with the isolated POSIX subsystem ghetto. So, *not* using strcasecmp() while using the Win32 API would be an impedance mismatch -- it would be expecting case sensitivity where it does not exist, and that would lead to bugs. It's not there for spite, it's there because that's how programs that use the Win32 API behave, and pretending otherwise doesn't make it so. If you'd like to rewrite all of Cygwin to use the native API exclusively and not use any Win32 APIs for anything dealing with files then you might have a fighting chance at also taking advantage of this obscure NTFS feature, but until then no. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/