From 221322607b378b288dece023897a34ef14aefe8a Mon Sep 17 00:00:00 2001 From: tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon, 17 Apr 2000 17:27:45 +0000 Subject: [PATCH] 2000-04-17 Bryce McKinlay <bryce@albatross.co.nz> * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names with a newline, for CNI. (print_stub_or_jni): Print a space or newline before method name for CNI as well as JNI. (print_cxx_classname): Don't write leading "::" in CNI stub method. (process_file): Include gcj/cni.h if generating CNI stubs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33213 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 9 +++++++++ gcc/java/gjavah.c | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index cf4728b4b1c1..5215ce082263 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +2000-04-17 Bryce McKinlay <bryce@albatross.co.nz> + + * gjavah.c (print_name_for_stub_or_jni): Don't prefix method names + with a newline, for CNI. + (print_stub_or_jni): Print a space or newline before method name for + CNI as well as JNI. + (print_cxx_classname): Don't write leading "::" in CNI stub method. + (process_file): Include gcj/cni.h if generating CNI stubs. + 2000-04-16 Tom Tromey <tromey@cygnus.com> * gjavah.c (decompile_method): Use print_field_name. diff --git a/gcc/java/gjavah.c b/gcc/java/gjavah.c index 436553cbca08..355f99c34aa1 100644 --- a/gcc/java/gjavah.c +++ b/gcc/java/gjavah.c @@ -1122,7 +1122,7 @@ DEFUN (print_name_for_stub_or_jni, (stream, jcf, name_index, signature_index, AND int name_index AND int signature_index AND int is_init AND const char *name_override AND int flags) { - const char *const prefix = flag_jni ? "Java_" : "\n"; + const char *const prefix = flag_jni ? "Java_" : ""; print_cxx_classname (stream, prefix, jcf, jcf->this_class); fputs (flag_jni ? "_" : "::", stream); print_full_cxx_name (stream, jcf, name_index, @@ -1188,9 +1188,8 @@ DEFUN(print_stub_or_jni, (stream, jcf, name_index, signature_index, is_init, /* When printing a JNI header we need to respect the space. In other cases we're just going to insert a newline anyway. */ - if (flag_jni) - fputs (need_space && ! stubs ? " " : "\n", stream); - + fputs (need_space && ! stubs ? " " : "\n", stream); + /* Now print the name of the thing. */ print_name_for_stub_or_jni (stream, jcf, name_index, signature_index, is_init, name_override, @@ -1251,7 +1250,7 @@ print_cxx_classname (stream, prefix, jcf, index) fputs (prefix, stream); /* Print a leading "::" so we look in the right namespace. */ - if (! flag_jni) + if (! flag_jni && ! stubs) fputs ("::", stream); while (s < limit) @@ -1691,6 +1690,7 @@ DEFUN(process_file, (jcf, out), if (len > 6 && ! strcmp (&jcf->classname[len - 6], ".class")) len -= 6; print_include (out, jcf->classname, len); + print_include (out, "gcj/cni", -1); } } -- GitLab