Mercurial > hg > release > icedtea6-1.9
changeset 2357:7451a7b2b43e icedtea6-1.9.10
Support buildnig 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 | Wed, 19 Oct 2011 01:20:54 +0100 |
parents | 28de6deb3971 |
children | baa3f10d0a8b |
files | ChangeLog Makefile.am patches/libpng-1.5.patch |
diffstat | 3 files changed, 50 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ahughes@redhat.com> + + * Makefile.am: Add new patch. + * patches/libpng-1.5.patch: + Support building against libpng 1.5. + 2011-10-14 Andrew John Hughes <ahughes@redhat.com> * Makefile.am: Add additional patches.
--- 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 += \
--- /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 */ +