On Sun, Aug 23, 2009 at 11:04, Xueming Shen<xueming.s...@sun.com> wrote: > Martin, > > Forgot to mentioned in last email, the original zlib.h actually has crc32 > declared using uLong, so > we have a compiling error on 64-bit after we define the uLong to 32-bit > unsigned, since the unsigned > long is 64-bit in crc32.c.
You're right that it's just an obvious bug in zlib 1.2.3 that the declaration and definition of crc32 don't match. Not confidence-inspiring. Martin > sherman > > Xueming Shen wrote: >> >>> I'm suspicious that the changes in crc32.c might not be needed, >>> because nobody else is having to make these changes. >>> Perhaps use of "unsigned long" in crc32.c is correct because >>> in these cases either a 32-bit or 64-bit type will do? >>> >>> Did you actually encounter functional problems with the original code? >>> >>> >> >> pack code at src/share/native/com/sun/java/util/jar/pack/zip.cpp expects >> the crc32() returns >> a "uint", it actually matches the uLong. So there is a compiling err on >> 64-bit platform if we keep >> crc32 un-touched. Sure, its possible to solve this problem by changing the >> pack code...first I >> would like to avid to touch pack code if possible, second asI said above, >> crc32 is a unsigned >> 32-bit, it seems right to simply use the unsigned 32-bit. >> >> sherman >> > >