This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



--- 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))) {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]