Please try this.
Index: gjavah.c
===
RCS file: /cvs/gcc/gcc/gcc/java/gjavah.c,v
retrieving revision 1.124
diff -c -2 -p -r1.124 gjavah.c
*** gjavah.c25 Nov 2004 11:13:37 - 1.124
--- gjavah.c6 Dec 2004 19:15:39 -
*** throwable_p (const unsigned char *clname
*** 1235,1239
int super_length = -1;
const char *classfile_name = find_class ((char *) current, strlen
((const char *) current),
! &jcf, 0);
if (! classfile_name)
--- 1235,1239
int super_length = -1;
const char *classfile_name = find_class ((char *) current, strlen
((const char *) current),
! &jcf, 0, 0);
if (! classfile_name)
*** main (int argc, char** argv)
*** 2521,2525
if (! output_file)
jcf_dependency_reset ();
! classfile_name = find_class (classname, strlen (classname), &jcf, 0);
if (classfile_name == NULL)
{
--- 2521,2525
if (! output_file)
jcf_dependency_reset ();
! classfile_name = find_class (classname, strlen (classname), &jcf, 0, 0);
if (classfile_name == NULL)
{
Index: java-tree.h
===
RCS file: /cvs/gcc/gcc/gcc/java/java-tree.h,v
retrieving revision 1.223
diff -c -2 -p -r1.223 java-tree.h
*** java-tree.h 26 Nov 2004 18:04:45 - 1.223
--- java-tree.h 6 Dec 2004 19:15:40 -
*** extern int is_array_type_p (tree);
*** 1248,1251
--- 1248,1252
extern HOST_WIDE_INT java_array_type_length (tree);
extern int read_class (tree);
+ extern int read_class_from_source (tree);
extern void load_class (tree, int);
Index: jcf-dump.c
===
RCS file: /cvs/gcc/gcc/gcc/java/jcf-dump.c,v
retrieving revision 1.64
diff -c -2 -p -r1.64 jcf-dump.c
*** jcf-dump.c 25 Nov 2004 11:13:38 - 1.64
--- jcf-dump.c 6 Dec 2004 19:15:40 -
*** main (int argc, char** argv)
*** 1036,1040
{
char *arg = argv[argi];
! const char *class_filename = find_class (arg, strlen (arg), jcf, 0);
if (class_filename == NULL)
class_filename = find_classfile (arg, jcf, NULL);
--- 1036,1040
{
char *arg = argv[argi];
! const char *class_filename = find_class (arg, strlen (arg), jcf, 0,
0);
if (class_filename == NULL)
class_filename = find_classfile (arg, jcf, NULL);
Index: jcf-io.c
===
RCS file: /cvs/gcc/gcc/gcc/java/jcf-io.c,v
retrieving revision 1.53
diff -c -2 -p -r1.53 jcf-io.c
*** jcf-io.c17 Oct 2004 22:51:35 - 1.53
--- jcf-io.c6 Dec 2004 19:15:40 -
*** static htab_t memoized_class_lookups;
*** 422,430
to it. Returns NULL on failure. If JCF != NULL, it is suitably
initialized. SOURCE_OK is true if we should also look for .java
!file. */
const char *
find_class (const char *classname, int classname_length, JCF *jcf,
! int source_ok)
{
int fd;
--- 422,431
to it. Returns NULL on failure. If JCF != NULL, it is suitably
initialized. SOURCE_OK is true if we should also look for .java
!file. SOURCE_ONLY is true iff we should only look for .java
!files. */
const char *
find_class (const char *classname, int classname_length, JCF *jcf,
! int source_ok, int source_only)
{
int fd;
*** find_class (const char *classname, int c
*** 464,468
{
const char *path_name = jcf_path_name (entry);
! if (class != 0)
{
int dir_len;
--- 465,469
{
const char *path_name = jcf_path_name (entry);
! if (class != 0 && ! source_only)
{
int dir_len;
Index: jcf-parse.c
===
RCS file: /cvs/gcc/gcc/gcc/java/jcf-parse.c,v
retrieving revision 1.180
diff -c -2 -p -r1.180 jcf-parse.c
*** jcf-parse.c 28 Nov 2004 06:49:48 - 1.180
--- jcf-parse.c 6 Dec 2004 19:15:41 -
*** static void set_source_filename (JCF *,
*** 107,110
--- 107,111
static void jcf_parse (struct JCF*);
static void load_inner_classes (tree);
+ static int read_class_worker (tree, int);
/* Handle "Deprecated" attribute. */
*** int
*** 514,517
--- 515,530
read_class (tree name)
{
+ return read_class_worker (name, 0);
+ }
+
+ int
+ read_class_from_source (tree name)
+ {
+ return read_class_worker (name, 1);
+ }
+
+ static int
+ read_class_worker (tree name, int source_only)
+ {
JCF this_jcf, *jcf;
tree icv, class = NULL_TREE;
*** read_class (tree name)
*** 534,538
jcf = &this_jcf;