[patch] make gij command-line compatible with java
Thomas Fitzsimmons
fitzsim@redhat.com
Fri Apr 1 23:33:00 GMT 2005
Hi,
On Fri, 2005-04-01 at 13:44 -0700, Tom Tromey wrote:
> I guess the rationale for recognizing all of these [-X options] is compatibility
> with existing launch scripts?
No, since gij will just ignore unrecognized -X options. I put in a
skeleton for handling these options as a hint to people implementing
similar options in the future. Where possible, I think we should reuse
the -X option names. For example, if we add strict JNI checking support
to libgcj, we'll want to wire that into -Xcheck:jni. The current
skeleton documents all the -X options recognized by Sun's 1.5 java
command.
> Tom> +extern inline void *
> Tom> +JvRealloc (void *ptr, jsize size)
> Tom> +{
> Tom> + return _Jv_Realloc (ptr, size);
> Tom> +}
>
> We only need a wrapper like this if we want to export it to the world.
> I don't care either way in this case.
>
> Hmm, JvMalloc and friends don't seem to be documented in the CNI part
> of the manual :-(
I thought that since we export JvMalloc we should also export JvRealloc.
I've added a "Memory allocation" section to the CNI manual that
documents these functions.
This new patch incorporates all your suggestions and updates the
manual's CNI and "Invoking gij" sections.
Tom
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gij-arg-parsing2.patch
Type: text/x-patch
Size: 25073 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050401/9481b7f3/attachment.bin>
More information about the Java-patches
mailing list