[8u60] Request for approval 8077982: GIFLIB upgrade
Seán Coffey
sean.coffey at oracle.com
Wed May 6 15:55:52 UTC 2015
Sounds like a good approach Andrew. Can you file a bug and fix in JDK 9
? A backport should be possible then.
Regards,
Sean.
On 06/05/15 16:32, Andrew Hughes wrote:
> ----- Original Message -----
>> Hello,
>>
>> This is a request for approval to backport a fix from the jdk9 to the
>> jdk8u-dev repository.
>> Changes applies cleanly to jdk8u-dev after path reshuffling.
>>
>> The bug: https://bugs.openjdk.java.net/browse/JDK-8077982
>> The fix: http://hg.openjdk.java.net/jdk9/client/jdk/rev/5bf5794f6193
>> The review:
>> http://mail.openjdk.java.net/pipermail/awt-dev/2015-April/009269.html
>>
>> --
>> Thanks,
>>
>> Alexander.
>>
>>
> The splashscreen changes, such as:
>
> @@ -310,7 +296,7 @@
> free(pBitmapBits);
> free(pOldBitmapBits);
>
> - DGifCloseFile(gif);
> + DGifCloseFile(gif, NULL);
>
> return 1;
> }
> @@ -318,7 +304,7 @@
> int
> SplashDecodeGifStream(Splash * splash, SplashStream * stream)
> {
> - GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc);
> + GifFileType *gif = DGifOpen((void *) stream, SplashStreamGifInputFunc, NULL);
>
> if (!gif)
> return 0;
>
> will break system giflib builds with versions older than 5.
>
> In fixing this in IcedTea, we added #ifdefs to this code.
>
> {
> +#if 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
>
> +#if GIFLIB_MAJOR > 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
> + int error = 0;
> + DGifCloseFile(gif, &error);
> + if (error)
> + return 0;
> +#else
> DGifCloseFile(gif);
> +#endif
>
More information about the jdk8u-dev
mailing list