This is the mail archive of the cygwin mailing list for the Cygwin 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]

Re: ntfs ObCaseInsensitive & cygwin?


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/


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