[kaffe] CVS kaffe (jim): Implemented -Xbootclasspath/p: option to prepend to BOOTCLASSPATH.

Kaffe CVS cvs-commits at kaffe.org
Fri Aug 29 15:09:02 PDT 2003


PatchSet 3994 
Date: 2003/08/29 21:57:10
Author: jim
Branch: HEAD
Tag: (none) 
Log:
Implemented -Xbootclasspath/p: option to prepend to BOOTCLASSPATH.

I didn't do -Xbootclasspath: and -Xbootclasspath/a: yet.

Members: 
	ChangeLog:1.1590->1.1591 
	kaffe/kaffe/main.c:1.47->1.48 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1590 kaffe/ChangeLog:1.1591
--- kaffe/ChangeLog:1.1590	Thu Aug 28 21:21:19 2003
+++ kaffe/ChangeLog	Fri Aug 29 21:57:10 2003
@@ -1,3 +1,9 @@
+2003-08-29  Jim Pick  <jim at kaffe.org>
+
+	* kaffe/kaffe/main.c:
+	Add support for -Xbootclasspath/p: option.  Lazily not implementing
+	-Xbootclasspath: and -Xbootclasspath/a: for now.
+
 2003-08-28  Herve Roussain <Herve.Roussain at univ-ubs.fr>
 
 	* kaffe/scripts/rmic.in:
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.47 kaffe/kaffe/kaffe/main.c:1.48
--- kaffe/kaffe/kaffe/main.c:1.47	Wed Aug 27 20:07:25 2003
+++ kaffe/kaffe/kaffe/main.c	Fri Aug 29 21:57:11 2003
@@ -394,6 +394,31 @@
 			/* set the new classpath */
 			vmargs.classpath = newcpath;
 		}
+		else if (strncmp(argv[i], "-Xbootclasspath/p:", (j=18)) == 0) {
+			char	*newbootcpath;
+			int      bootcpathlength;
+
+			bootcpathlength = strlen(&argv[i][j])
+				+ strlen(path_separator)
+				+ ((vmargs.bootClasspath != NULL) ?
+					strlen(vmargs.bootClasspath) : 0)
+				+ 1;
+
+			/* Get longer buffer FIXME:  free the old one */
+			if ((newbootcpath = malloc(bootcpathlength)) == NULL) {
+				fprintf(stderr,  "Error: out of memory.\n");
+				exit(1);
+			}
+
+			/* Construct new boot classpath */
+			strcpy(newbootcpath, &argv[i][j]);
+			strcat(newbootcpath, path_separator);
+			if( vmargs.bootClasspath != 0 )
+			  	strcat(newbootcpath, vmargs.bootClasspath);
+
+			/* set the new boot classpath */
+			vmargs.bootClasspath = newbootcpath;
+		}
 		else if ((strncmp(argv[i], "-ss", (j=3)) == 0) 
 			 || (strncmp(argv[i], "-Xss", (j=4)) == 0)) {
 			if (argv[i][j] == 0) {




More information about the kaffe mailing list