Patch: FYI: gcjh and PR 5365 again
Tom Tromey
tromey@redhat.com
Wed Jan 16 13:17:00 GMT 2002
I'm checking this in.
This changes gcjh so that the generated CNI stub files can be compiled
directly. After this goes in I'm going to close PR 5365.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
More for PR java/5365:
* gjavah.c (print_stub_or_jni): Cause exception to be thrown by
default.
(process_file): Generate include for
java.lang.UnsupportedOperationExceptions.
Index: gjavah.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/gjavah.c,v
retrieving revision 1.81
diff -u -r1.81 gjavah.c
--- gjavah.c 2002/01/16 00:27:05 1.81
+++ gjavah.c 2002/01/16 21:15:46
@@ -1503,12 +1503,13 @@
if (flag_jni)
fputs ("\n{\n (*env)->FatalError (\"", stream);
else
- fputs ("\n{\n JvFail (\"", stream);
+ fputs ("\n{\n throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 (\"", stream);
print_name_for_stub_or_jni (stream, jcf, name_index,
signature_index, is_init,
name_override,
flags);
- fputs (" not implemented\");\n}\n\n", stream);
+ fprintf (stream, " not implemented\")%s;\n}\n\n",
+ flag_jni ? "" : ")");
}
}
}
@@ -1982,7 +1983,11 @@
free (name);
if (! flag_jni)
- print_include (out, "gcj/cni", -1);
+ {
+ print_include (out, "gcj/cni", -1);
+ print_include (out, "java/lang/UnsupportedOperationException",
+ -1);
+ }
}
}
More information about the Gcc-patches
mailing list