changeset 2965:3439277534e3

PR1319: Support GIF lib v5. 2013-02-14 Andrew John Hughes <gnu.andrew@redhat.com> PR1319: Support GIF lib v5. * Makefile.am: (ICEDTEA_PATCHES): Add new patch. * patches/pr1319-support_giflib_5.patch: Support building with giflib 5.x.
author Andrew John Hughes <gnu.andrew@redhat.com>
date Fri, 15 Feb 2013 01:09:35 +0000
parents 06c8caca7d7c
children 8b08136ed5c1
files ChangeLog Makefile.am patches/pr1319-support_giflib_5.patch
diffstat 3 files changed, 39 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Feb 15 00:02:19 2013 +0000
+++ b/ChangeLog	Fri Feb 15 01:09:35 2013 +0000
@@ -1,3 +1,11 @@
+2013-02-14  Andrew John Hughes  <gnu.andrew@redhat.com>
+
+	PR1319: Support GIF lib v5.
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add new patch.
+	* patches/pr1319-support_giflib_5.patch:
+	Support building with giflib 5.x.
+
 2013-02-14  Andrew John Hughes  <gnu.andrew@redhat.com>
 
 	PR1317: Provide an option to build with a more up-to-date HotSpot
--- a/Makefile.am	Fri Feb 15 00:02:19 2013 +0000
+++ b/Makefile.am	Fri Feb 15 01:09:35 2013 +0000
@@ -469,7 +469,8 @@
 	patches/openjdk/7162902-corba_fixes.patch \
 	patches/traceable.patch \
 	patches/openjdk/8005615-failure_to_load_logger_implementation.patch \
-	patches/openjdk/8004341-jck_dialog_failure.patch
+	patches/openjdk/8004341-jck_dialog_failure.patch \
+	patches/pr1319-support_giflib_5.patch
 
 if WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pr1319-support_giflib_5.patch	Fri Feb 15 01:09:35 2013 +0000
@@ -0,0 +1,29 @@
+# HG changeset patch
+# User andrew
+# Date 1360886106 0
+# Node ID fd2187713a998a312ee76405f58df3719ec04db1
+# Parent  bbfd732ae37d02301b065722f9c7a930118adde3
+PR1319: Support building with giflib 5
+
+diff --git a/src/share/native/sun/awt/splashscreen/splashscreen_gif.c b/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+--- openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
+@@ -316,9 +316,18 @@
+ int
+ SplashDecodeGifStream(Splash * splash, SplashStream * stream)
+ {
++#ifdef GIFLIB_MAJOR >= 5
++    int error = 0;
++    GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, &error);
++
++    if (error)
++	return 0;
++#else
+     GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc);
+ 
+     if (!gif)
+         return 0;
++#endif
++
+     return SplashDecodeGif(splash, gif);
+ }