# HG changeset patch # User Andrew John Hughes # Date 1318946680 -3600 # Node ID 878baf89f19a3897c12be2131b2e59fc82fe6828 # Parent d29047ebebcbf025a785fed606e46b281a7c3cf4 Support building against libpng 1.5. 2011-10-13 Andrew John Hughes * Makefile.am: Add new patch. * patches/libpng-1.5.patch: Support building against libpng 1.5. diff -r d29047ebebcb -r 878baf89f19a ChangeLog --- 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 + + * Makefile.am: Add new patch. + * patches/libpng-1.5.patch: + Support building against libpng 1.5. + 2011-10-17 Andrew John Hughes PR764: icedtea 1.8.9 fails to build in CachedJarFileCallback.java diff -r d29047ebebcb -r 878baf89f19a Makefile.am --- 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 \ diff -r d29047ebebcb -r 878baf89f19a patches/libpng-1.5.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 */ +