This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
fastjar question
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: GCC <gcc at gcc dot gnu dot org>
- Date: Mon, 05 Jan 2004 13:13:06 +0100
- Subject: fastjar question
Hi all,
while investigating PR13011 I struggled over fastjar doing some things
which are not clear to me. Maybe someone of you can enlighten me :)
When I create a jar archive without any MANIFEST.MF it will be created
by the jar tool itself. Here compared with an older jar from sun and the
one on my darwin box.
All three create an empty line after the Created-By entry. Is this
correct? I guess so. But in reality this empty line should be filled
with an attribute later ? Otherwise gij -jar or java -jar complain about
an invalid manifest.
Second, this thing is much more annoying, the fastjar jar creates a ^@
entry as last 'character' in the MANIFEST. This is in my opinion wrong.
A look into the fastjar source I found the place and I modified it to
ommit this ^@. Though, I don't understand the source. Here I'd like to
hear if this is intended behaviour or a possible bug.
Below the diff.
Any pointers or explanations welcome.
TIA,
Andreas
--- jartool.c 2 Jul 2003 17:20:54 -0000 1.24
+++ jartool.c 5 Jan 2004 12:04:34 -0000
@@ -732,7 +732,7 @@
/* if the user didn't specify an external manifest file... */
if(mf_name == NULL){
- int mf_len = 37 + strlen(VERSION);
+ int mf_len = 36 + strlen(VERSION);
char *mf;
if((mf = (char *) malloc(mf_len + 1))) {