re PR libgcj/20090 (gij should be implemented in Java)

2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>

	* gcj.texi (Invoking gij): Add descriptions of new -X options.
	Mention recognized-and-ignored compatibility options.
	(Memory allocation): Add descriptions of JvMalloc, JvRealloc and
	JvFree.
	(About CNI): Add Memory allocation section.

2005-04-01  Thomas Fitzsimmons  <fitzsim@redhat.com>

	PR libgcj/20090, PR libgcj/20526
	* gij.cc (nonstandard_opts_help): New function.
	(add_option): New function.
	(main): Support java options.  Set java.class.path.  Don't set
	_Jv_Jar_Class_Path.
	* prims.cc (parse_x_arg): New function.
	(parse_init_args): Call parse_x_arg for -X and _ options, when
	ignoreUnrecognized is true.
	(new _Jv_RunMain): New vm_args variant.
	(old _Jv_RunMain): Call new vm_args _Jv_RunMain.
	(_Jv_Jar_Class_Path): Remove variable.
	* include/java-props.h: Likewise.
	* include/cni.h (JvRealloc): New function.
	* include/jvm.h (_Jv_RunMain): Declare vm_args variant.
	* java/lang/natRuntime.cc (insertSystemProperties): Remove
	_Jv_Jar_Class_Path logic.  Use JV_VERSION and JV_API_VERSION
	macros.
	* configure.ac (JV_VERSION): Define.
	(JV_API_VERSION): Likewise.
	* configure: Regenerate.
	* include/config.h.in: Regenerate.

From-SVN: r97429
This commit is contained in:
Thomas Fitzsimmons 2005-04-02 02:26:51 +00:00 committed by Thomas Fitzsimmons
parent ca6ca8fa9c
commit b6121641fc
12 changed files with 473 additions and 125 deletions

View file

@ -369,8 +369,8 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
// (introduced in 1.2), and earlier versioning properties. Some
// programs rely on seeing values that they expect, so we claim to
// be a 1.4-ish VM for their sake.
SET ("java.version", "1.4.2");
SET ("java.runtime.version", "1.4.2");
SET ("java.version", JV_VERSION);
SET ("java.runtime.version", JV_VERSION);
SET ("java.vendor", "Free Software Foundation, Inc.");
SET ("java.vendor.url", "http://gcc.gnu.org/java/");
SET ("java.class.version", "46.0");
@ -380,7 +380,7 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
SET ("java.vm.version", __VERSION__);
SET ("java.vm.vendor", "Free Software Foundation, Inc.");
SET ("java.vm.name", "GNU libgcj");
SET ("java.specification.version", "1.4");
SET ("java.specification.version", JV_API_VERSION);
SET ("java.specification.name", "Java(tm) Platform API Specification");
SET ("java.specification.vendor", "Sun Microsystems Inc.");
@ -569,30 +569,6 @@ java::lang::Runtime::insertSystemProperties (java::util::Properties *newprops)
}
#endif
if (_Jv_Jar_Class_Path)
newprops->put(JvNewStringLatin1 ("java.class.path"),
JvNewStringLatin1 (_Jv_Jar_Class_Path));
else
{
// FIXME: find libgcj.zip and append its path?
char *classpath = ::getenv("CLASSPATH");
jstring cp = newprops->getProperty (JvNewStringLatin1("java.class.path"));
java::lang::StringBuffer *sb = new java::lang::StringBuffer ();
if (classpath)
{
sb->append (JvNewStringLatin1 (classpath));
sb->append (_Jv_platform_path_separator);
}
if (cp != NULL)
sb->append (cp);
else
sb->append ((jchar) '.');
newprops->put(JvNewStringLatin1 ("java.class.path"),
sb->toString ());
}
// The name used to invoke this process (argv[0] in C).
SET ("gnu.gcj.progname", _Jv_GetSafeArg (0));