summaryrefslogtreecommitdiffstats
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-12 21:48:14 +0000
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>1998-12-12 21:48:14 +0000
commitad6e11c6697b9c188cda66f68970ab1d36fae195 (patch)
tree3618f3490d406530e474caa40d130508ce032f6e /gcc/java/jcf-parse.c
parent087b842d4d886b93fc6538ef77ed1cd5bca97494 (diff)
downloadppe42-gcc-ad6e11c6697b9c188cda66f68970ab1d36fae195.tar.gz
ppe42-gcc-ad6e11c6697b9c188cda66f68970ab1d36fae195.zip
8
Loks of changes so we can better compile from source. See ChangeLog. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r--gcc/java/jcf-parse.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index ef3ea47a098..5d8a5e09c04 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -55,6 +55,11 @@ extern struct obstack *saveable_obstack;
extern struct obstack temporary_obstack;
extern struct obstack permanent_obstack;
+/* This is true if the user specified a `.java' file on the command
+ line. Otherwise it is 0. FIXME: this is temporary, until our
+ .java parser is fully working. */
+int saw_java_source = 0;
+
/* The class we are currently processing. */
tree current_class = NULL_TREE;
@@ -477,8 +482,13 @@ load_class (class_or_name, verbose)
/* Search in current zip first. */
if (find_in_current_zip (IDENTIFIER_POINTER (name),
IDENTIFIER_LENGTH (name), &jcf) == 0)
+ /* FIXME: until the `.java' parser is fully working, we only
+ look for a .java file when one was mentioned on the
+ command line. This lets us test the .java parser fairly
+ easily, without compromising our ability to use the
+ .class parser without fear. */
if (find_class (IDENTIFIER_POINTER (name), IDENTIFIER_LENGTH (name),
- &this_jcf, 1) == 0)
+ &this_jcf, saw_java_source) == 0)
{
if (verbose)
{
@@ -739,7 +749,6 @@ yyparse ()
if (list[0])
{
char *value, len;
- extern int saw_java_source; /* FIXME: temporary. */
len = strlen (list);
/* FIXME: this test is only needed until our .java parser is
@@ -961,7 +970,8 @@ DEFUN(jcf_figure_file_type, (jcf),
return JCF_CLASS;
/* FIXME: is it a system file? */
- if (!open_in_zip (jcf, input_filename, NULL, 0))
+ if (magic == (JCF_u4)ZIPMAGIC
+ && !open_in_zip (jcf, input_filename, NULL, 0))
{
localToFile = ALLOC (sizeof (struct ZipFileCache));
bcopy (SeenZipFiles, localToFile, sizeof (struct ZipFileCache));
OpenPOWER on IntegriCloud