[PATCH] Allow usage of external zlib copy

Diego 'Flameeyes' Pettenò flameeyes at gmail.com
Fri May 11 17:39:13 UTC 2007


On Fri, 11 May 2007 08:40:54 -0700
Phil Race <Phil.Race at Sun.COM> wrote:

> The JDK's libjpeg is not the standard  IJG one. It has additional
> stuff in it and exposes only the
> symbols needed by the JDK. So in no way is it interchangeable.

This might be a problem. The exposure of symbols shouldn't be a problem
on its own (used as a shared library, the symbols exported are generic
enough); the additional stuff instead can be a problem indeed.

I can't seem to find a detail of what the changes are, but I can tell
that using the jpeg library in Gentoo let OpenJDK build fine at least.
I haven't sent any patch yet because I have to find a way to test it
out first. (zlib was easier). Note that also Gentoo's jpeg is not
totally vanilla, it contains a few patches coming from Debian, and a
security fix to keep a large allocation of memory from killing the
system. If the additional stuff might be of help, and wouldn't break
software written with vanilla jpeg in mind, it might as well be
possible to backport those changes in Gentoo's jpeg library.

As far as I can see a good deal of the changes replaces the symbol main
with _main, the functional changes are at a minimum, I see a change in
the way EQTs are emitted, and an error downgraded to warning, and a
change in INT32 definition. I see some sprintf() calls changed to
jio_snprintf() too.

After all, it doesn't seem like a difficult task to get the external
jpeg library to work fine with OpenJDK.

I've seen there are also copies of libpng and giflib, are those
modified in some way, too? I'm now running a build with those used
external too.

-- 
Diego "Flameeyes" Pettenò
http://farragut.flameeyes.is-a-geek.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20070511/703759e9/signature.asc>


More information about the build-dev mailing list