Mercurial > hg > release > icedtea6-1.8
changeset 2163:878baf89f19a
Support building against libpng 1.5.
2011-10-13 Andrew John Hughes <ahughes@redhat.com>
* Makefile.am: Add new patch.
* patches/libpng-1.5.patch:
Support building against libpng 1.5.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Tue, 18 Oct 2011 15:04:40 +0100 |
parents | d29047ebebcb |
children | 17524de1ad5c |
files | ChangeLog Makefile.am patches/libpng-1.5.patch |
diffstat | 3 files changed, 50 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Oct 18 13:54:08 2011 +0100 +++ b/ChangeLog Tue Oct 18 15:04:40 2011 +0100 @@ -1,3 +1,9 @@ +2011-10-13 Andrew John Hughes <ahughes@redhat.com> + + * Makefile.am: Add new patch. + * patches/libpng-1.5.patch: + Support building against libpng 1.5. + 2011-10-17 Andrew John Hughes <ahughes@redhat.com> PR764: icedtea 1.8.9 fails to build in CachedJarFileCallback.java
--- a/Makefile.am Tue Oct 18 13:54:08 2011 +0100 +++ b/Makefile.am Tue Oct 18 15:04:40 2011 +0100 @@ -400,7 +400,8 @@ patches/openjdk/6691503-malicious-applet-always-on-top.patch \ patches/jtreg-LastErrorString.patch \ patches/mark_sun_toolkit_privileged_code.patch \ - patches/support_linux_3.patch + patches/support_linux_3.patch \ + patches/libpng-1.5.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/libpng-1.5.patch Tue Oct 18 15:04:40 2011 +0100 @@ -0,0 +1,42 @@ +diff -r b139627f7bc3 src/share/native/sun/awt/splashscreen/splashscreen_png.c +--- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c Mon Nov 22 09:43:58 2010 +0800 ++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c Tue Oct 18 13:55:10 2011 +0100 +@@ -31,12 +31,22 @@ + + #define SIG_BYTES 8 + ++#if (PNG_LIBPNG_VER < 10500) ++#define GET_IO_PTR(png_ptr) png_ptr->io_ptr ++#define JMPBUF(png_ptr) png_ptr->jmpbuf ++#define SET_READ_FN(png_ptr,iop,read_func) png_ptr->io_ptr = iop; png_ptr->read_data_fn = read_func; ++#else ++#define GET_IO_PTR(png_ptr) png_get_io_ptr(png_ptr) ++#define JMPBUF(png_ptr) png_jmpbuf(png_ptr) ++#define SET_READ_FN(png_ptr,iop,read_func) png_set_read_fn(png_ptr,iop,read_func); ++#endif ++ + void PNGAPI + my_png_read_stream(png_structp png_ptr, png_bytep data, png_size_t length) + { + png_uint_32 check; + +- SplashStream * stream = (SplashStream*)png_ptr->io_ptr; ++ SplashStream * stream = (SplashStream*)GET_IO_PTR(png_ptr); + check = stream->read(stream, data, length); + if (check != length) + png_error(png_ptr, "Read Error"); +@@ -71,12 +81,11 @@ + goto done; + } + +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(JMPBUF(png_ptr))) { + goto done; + } + +- png_ptr->io_ptr = io_ptr; +- png_ptr->read_data_fn = read_func; ++ SET_READ_FN(png_ptr, io_ptr, read_func) + + png_set_sig_bytes(png_ptr, SIG_BYTES); /* we already read the 8 signature bytes */ +