Patch: Change hardcoded '/' to DIR_SEPARATOR in jcf-io.c

Mohan Embar gnustuff@thisiscool.com
Sun Mar 16 16:12:00 GMT 2003


(Resubmitted to both gcc-patches and java-patches. The patch itself is
unchanged.)

Hi Patch People,

This patch is needed to produce correct behavior when scandir()/alphasort()
are present on Win32 platforms. It also seems to make more sense for all
platforms because it eliminates a hardcoded directory separator.

This has nothing to do with the Win32 case sensitivity patch I will resubmit
soon.

Tested on i686-pc-mingw32 and i686-pc-linux-gnu.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

ChangeLog
2003-03-15  Mohan Embar  <gnustuff@thisiscool.com>

	* jcf-io.c (find_class): use DIR_SEPARATOR instead of
	'/' when computing java source filename

Index: jcf-io.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/java/jcf-io.c,v
retrieving revision 1.36.2.2
diff -u -2 -r1.36.2.2 jcf-io.c
--- jcf-io.c	10 Mar 2003 19:32:23 -0000	1.36.2.2
+++ jcf-io.c	16 Mar 2003 05:44:47 -0000
@@ -524,5 +524,5 @@
 	  l = strlen (java_buffer);
 	  for (m = 0; m < classname_length; ++m)
-	    java_buffer[m + l] = (classname[m] == '.' ? '/' : classname[m]);
+	    java_buffer[m + l] = (classname[m] == '.' ? DIR_SEPARATOR : classname[m]);
 	  strcpy (java_buffer + m + l, ".java");
 	  java = caching_stat (java_buffer, &java_buf);










More information about the Gcc-patches mailing list