This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: jcf-path.c and filename case-insensitivity on Win32
- From: Tom Tromey <tromey at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 01 Mar 2003 16:34:50 -0700
- Subject: Re: Patch: jcf-path.c and filename case-insensitivity on Win32
- References: <3E591729.9FEFF8B1@hotmail.com>
- Reply-to: tromey at redhat dot com
>>>>> "Ranjit" == Ranjit Mathew <rmathew at hotmail dot com> writes:
Ranjit> * jcf-path.c (add_entry): Compare ZIP and JAR files in a
Ranjit> case-insensitive way if we have a DOS-based filesystem.
Ranjit> Use IS_DIR_SEPARATOR instead of explicit checking against
Ranjit> DIR_SEPARATOR.
Ranjit> (jcf_path_extdirs_arg): Use IS_DIR_SEPARATOR instead of
Ranjit> explicitly checking against DIR_SEPARATOR.
Andrew will have to review this, but...
Ranjit> + #if defined (HAVE_DOS_BASED_FILE_SYSTEM) && defined (HAVE_STRCASECMP)
Ranjit> + if (len > 4 && (strcasecmp (filename + len - 4, ".zip") == 0
Ranjit> + || strcasecmp (filename + len - 4, ".jar") == 0))
Ranjit> + #else
Ranjit> if (len > 4 && (strcmp (filename + len - 4, ".zip") == 0
Ranjit> || strcmp (filename + len - 4, ".jar") == 0))
Ranjit> + #endif
I'd prefer we add a new macro, like COMPARE_FILENAMES, and then define
that as strcmp or strcasecmp.
Best would be to do this in system.h, though personally I'd settle for
some header in gcc/java/.
Tom