Patch: FYI: PR java/33765
Tom Tromey
tromey@redhat.com
Fri Nov 2 20:00:00 GMT 2007
I'm checking this in.
This fixes PR java/33765. The bug here is that compiling an empty
.java file ICEs. This patch changes it to do nothing.
Tom
ChangeLog:
2007-11-02 Tom Tromey <tromey@redhat.com>
PR java/33765:
* jcf-parse.c (java_parse_file): Ignore ZIPEMPTYMAGIC files.
* zipfile.h (ZIPEMPTYMAGIC): New define.
Index: jcf-parse.c
===================================================================
--- jcf-parse.c (revision 129850)
+++ jcf-parse.c (working copy)
@@ -1946,6 +1946,10 @@
#endif
parse_zip_file_entries ();
}
+ else if (magic == (JCF_u4) ZIPEMPTYMAGIC)
+ {
+ /* Ignore an empty input jar. */
+ }
else
{
gcc_unreachable ();
Index: zipfile.h
===================================================================
--- zipfile.h (revision 129850)
+++ zipfile.h (working copy)
@@ -58,6 +58,7 @@
#define ZIPDIR_NEXT(ZIPD) \
((ZipDirectory*)((char*)(ZIPD)+(ZIPD)->direntry_size))
#define ZIPMAGIC 0x504b0304
+#define ZIPEMPTYMAGIC 0x504b0506
extern ZipFile * opendir_in_zip (const char *, int);
extern int read_zip_archive (ZipFile *);
More information about the Java-patches
mailing list