Index: gij.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gij.cc,v
retrieving revision 1.25
diff -u -r1.25 gij.cc
--- gij.cc 18 Feb 2005 20:52:14 -0000 1.25
+++ gij.cc 22 Feb 2005 05:51:45 -0000
@@ -57,7 +57,6 @@
{
/* We rearrange ARGV so that all the -D options appear near the
beginning. */
- int last_D_option = 0;
bool jar_mode = false;
int i;
@@ -77,7 +76,12 @@
if (! strncmp (arg, "-D", 2))
{
- argv[last_D_option++] = arg + 2;
+ _Jv_Compiler_Properties = (const char**) realloc
+ (_Jv_Compiler_Properties,
+ (_Jv_Properties_Count + 1) * sizeof (char*));
+
+ _Jv_Compiler_Properties[_Jv_Properties_Count++] = strdup (arg + 2);
Index: prims.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/prims.cc,v
retrieving revision 1.103
diff -u -r1.103 prims.cc
--- prims.cc 16 Feb 2005 04:16:06 -0000 1.103
+++ prims.cc 22 Feb 2005 05:51:46 -0000
@@ -80,10 +80,9 @@
// functions are changed to take a size_t argument instead of jint.
#define MAX_OBJECT_SIZE ((1<<31) - 1)
-static const char *no_properties[] = { NULL };
-
// Properties set at compile time.
-const char **_Jv_Compiler_Properties = no_properties;
+const char **_Jv_Compiler_Properties = NULL;
+int _Jv_Properties_Count = 0;
// The JAR file to add to the beginning of java.class.path.
const char *_Jv_Jar_Class_Path;
@@ -909,16 +908,167 @@
bool runtimeInitialized = false;
}
jint
-_Jv_CreateJavaVM (void* /*vm_args*/)
+_Jv_CreateJavaVM (void* vm_args)
{