harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject svn commit: r312650 - /incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c
Date Mon, 10 Oct 2005 13:45:50 GMT
Author: geirm
Date: Mon Oct 10 06:45:47 2005
New Revision: 312650

URL: http://svn.apache.org/viewcvs?rev=312650&view=rev
Log:
Double '\' for windows paths...

Modified:
    incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c

Modified: incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c?rev=312650&r1=312649&r2=312650&view=diff
==============================================================================
--- incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c
(original)
+++ incubator/harmony/enhanced/trunk/sandbox/contribs/bootjvm/bootJVM/jvm/src/classpath.c
Mon Oct 10 06:45:47 2005
@@ -505,6 +505,8 @@
              * with suffix.  Make @e sure all files are writeable
              * for final <b><code>rm -rf</code></b>.
              */
+             
+            
             sprintfLocal(jarscript,
                          JVMCFG_JARFILE_DATA_EXTRACT_SCRIPT,
                          tmparea_get(),
@@ -514,7 +516,34 @@
                          classpath_list[i],
                          class_location);
 
-            int rc = system(jarscript);
+#ifdef CONFIG_WINDOWS
+
+           /*
+            *   gmj : awful hack - need to escape out every \ in paths
+            *   or it doesn't seem to get across into the batch file correctly
+            */
+		   rchar *fixscript = HEAP_GET_DATA(JVMCFG_SCRIPT_MAX, rfalse);
+
+           char *buffptr = fixscript;
+		   char *jarscriptPtr = jarscript;
+		              
+		   char c;
+           while((c = *jarscriptPtr++)) {
+           		*buffptr++ = c;
+           		
+	             if (c == '\\') 
+	             {
+	           	    *buffptr++ = '\\';
+	             } 
+           }
+           *buffptr = '\0';
+           
+           strcpy(jarscript, fixscript);
+           HEAP_FREE_DATA(fixscript);
+                        
+#endif
+
+           int rc = system(jarscript);
 
             if (0 != rc)
             {



Mime
View raw message