Mercurial > hg > release > icedtea6-1.8
changeset 1841:fcd85ef6c2ae
Support libjpeg8 and always choose the dlopen invocation at build time.
2010-01-25 Andrew John Hughes <ahughes@redhat.com>
* patches/icedtea-libraries.patch:
Make all dlopen choices at build-time,
not just one. Support libjpeg8 as well.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Mon, 25 Jan 2010 15:35:21 +0000 |
parents | d9e0d17a294a |
children | 7f40cc095348 |
files | ChangeLog patches/icedtea-libraries.patch |
diffstat | 2 files changed, 20 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Jan 21 16:11:56 2010 +0000 +++ b/ChangeLog Mon Jan 25 15:35:21 2010 +0000 @@ -1,3 +1,9 @@ +2010-01-25 Andrew John Hughes <ahughes@redhat.com> + + * patches/icedtea-libraries.patch: + Make all dlopen choices at build-time, + not just one. Support libjpeg8 as well. + 2010-01-21 Andrew John Hughes <ahughes@redhat.com> PR icedtea/433
--- a/patches/icedtea-libraries.patch Thu Jan 21 16:11:56 2010 +0000 +++ b/patches/icedtea-libraries.patch Mon Jan 25 15:35:21 2010 +0000 @@ -25045,18 +25045,22 @@ } -@@ -2317,6 +2377,146 @@ +@@ -2317,6 +2377,150 @@ /********************** end of destination manager ************/ +METHODDEF(void) +initIDs() +{ ++#if JPEG_LIB_VERSION >= 80 ++ void *handle = dlopen("libjpeg.so.8", RTLD_LAZY | RTLD_GLOBAL); ++#else +#if JPEG_LIB_VERSION >= 70 + void *handle = dlopen("libjpeg.so.7", RTLD_LAZY | RTLD_GLOBAL); +#else + void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL); +#endif ++#endif + + jpegstderror = (fn_jpegstderror)dlsym(handle, "jpeg_std_error"); + if (jpegstderror == NULL) { @@ -25343,14 +25347,19 @@ /* Initialize the Java VM instance variable when the library is first loaded */ JavaVM *jvm; -@@ -462,6 +493,71 @@ +@@ -462,6 +493,76 @@ Java_sun_awt_image_JPEGImageDecoder_initIDs(JNIEnv *env, jclass cls, jclass InputStreamClass) { ++#if JPEG_LIB_VERSION >= 80 ++ void *handle = dlopen("libjpeg.so.8", RTLD_LAZY | RTLD_GLOBAL); ++#else ++#if JPEG_LIB_VERSION >= 70 + void *handle = dlopen("libjpeg.so.7", RTLD_LAZY | RTLD_GLOBAL); -+ if (handle == NULL) { -+ handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL); -+ } ++#else ++ void *handle = dlopen("libjpeg.so.62", RTLD_LAZY | RTLD_GLOBAL); ++#endif ++#endif + + jpegstderror = (fn_jpegstderror)dlsym(handle, "jpeg_std_error"); + if (jpegstderror == NULL) {