This is the mail archive of the
mailing list for the Java project.
Re: Patch for Preview: jcf-io.c and Win32 case-insensitive filename handling
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java-patches at gcc dot gnu dot org
- Date: Wed, 12 Mar 2003 08:09:11 -0600
- Subject: Re: Patch for Preview: jcf-io.c and Win32 case-insensitive filename handling
- Reply-to: gnustuff at thisiscool dot com
>I might be wrong, but AFAIK, the proper way to do this is to define
>it as a host file system macro....
>Perhaps this should really go in libiberty and specified as an
>"extra" object for windows (see "libiberty/config/mh-windows")....
I've only been at this for about a month and the enormity of what
you're suggesting paralyzes me. (Just like when Andrew first said
I should mess around in natRuntime.cc and posix.cc.)
- My code is specific to the open() call. If we did what you are
saying, we'd really need a CHECK_EXACT_CASE which was a no-op
on non-Win32, because the caller could want to do a subsequent open,
or an fopen, or who-knows-what.
- I have a hard time imagining the utility of this for anything other
than its intended purpose. Since Win32 is case-insensitive, requests
to open a file in a case-insensitive manner should be honored in all
but fringe cases like this.
>AFAICT, Cygwin will also have to define this, but in a different
>way from MinGW because it has a strict_case on/off runtime
>setting. (What about MacOS X, where UFS seems to care about
>case but HFS+ does not? See
I was initially tempted to handle the Cygwin piece too, but I
figured that they already have a workaround and the extra effort
to determine the right way to do it for them would have made
me procrastinate on this indefinitely. In the end, I opted to
leave a framework in place that makes it trivial for anyone
to add themselves to the case insensitive gang (add an entry
in jcf.h, add a jcf-<os>.c file, add the file to Make-lang.in).
I also figured that the Darwin folks would jump on the bandwagon
if this ever got accepted.
>In jcf-win32.c, you should FindClose(hFile) *after* you have
>determined that hFile is not an INVALID_HANDLE_VALUE.
I *KNEW* you would catch this even as I was sending it, even
though the call is innocuous and we ignore any return code.
(I threw this code around one time too many and didn't want
to deal with it anymore.) You're right, Mom. Since I'm sure that
this is going to be further, er, "critiqued" based on your foo (bar)
and other remarks, I'll wait a bit for more feedback before resubmitting