# HG changeset patch # User Andrew John Hughes # Date 1318983654 -3600 # Node ID 7451a7b2b43e5c529c53a28361693cd51fc41a18 # Parent 28de6deb397111f14ed490c897e00786378d976c Support buildnig 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 28de6deb3971 -r 7451a7b2b43e ChangeLog --- a/ChangeLog Fri Oct 14 11:37:14 2011 +0100 +++ b/ChangeLog Wed Oct 19 01:20:54 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-14 Andrew John Hughes * Makefile.am: Add additional patches. diff -r 28de6deb3971 -r 7451a7b2b43e Makefile.am --- a/Makefile.am Fri Oct 14 11:37:14 2011 +0100 +++ b/Makefile.am Wed Oct 19 01:20:54 2011 +0100 @@ -367,7 +367,8 @@ patches/shark-llvm-2.9.patch \ patches/mark_sun_toolkit_privileged_code.patch \ patches/fonts-rhel-version.patch \ - patches/support_linux_3.patch + patches/support_linux_3.patch \ + patches/libpng-1.5.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 28de6deb3971 -r 7451a7b2b43e patches/libpng-1.5.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/libpng-1.5.patch Wed Oct 19 01:20:54 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 */ +