This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java 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: Patch: jcf-path.c and filename case-insensitivity on Win32


>>>>> "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


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