From d02abd38be9359896690fe6c184ddfb552d035fa Mon Sep 17 00:00:00 2001 From: Cray Elliott Date: Sat, 11 Oct 2014 01:39:02 -0700 Subject: [PATCH] Update libgdiplus' giflib patch to work with 5.1.0 closes issue #4469 --- .../libraries/libgdiplus/giflib.patch | 44 +++++++++++++++---- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/libgdiplus/giflib.patch b/pkgs/development/libraries/libgdiplus/giflib.patch index b1135f47f3ac..7b90d9863fd6 100644 --- a/pkgs/development/libraries/libgdiplus/giflib.patch +++ b/pkgs/development/libraries/libgdiplus/giflib.patch @@ -1,8 +1,7 @@ -diff --git a/src/gifcodec.c b/src/gifcodec.c -index 8dee0eb..564beed 100644 +diff -Naur libgdiplus-2.10.9-orig/src/gifcodec.c libgdiplus-2.10.9/src/gifcodec.c --- src/gifcodec.c +++ src/gifcodec.c -@@ -39,8 +39,10 @@ GUID gdip_gif_image_format_guid = {0xb96b3cb0U, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0 +@@ -39,8 +39,10 @@ #include "gifcodec.h" @@ -13,7 +12,7 @@ index 8dee0eb..564beed 100644 /* Data structure used for callback */ typedef struct -@@ -105,7 +107,7 @@ gdip_gif_inputfunc (GifFileType *gif, GifByteType *data, int len) +@@ -105,7 +107,7 @@ */ static int @@ -22,7 +21,7 @@ index 8dee0eb..564beed 100644 { ExtensionBlock *ep; -@@ -129,7 +131,7 @@ AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[]) +@@ -129,7 +131,7 @@ if (ExtData) { memcpy(ep->Bytes, ExtData, Len); @@ -31,7 +30,7 @@ index 8dee0eb..564beed 100644 } return (GIF_OK); -@@ -232,20 +234,20 @@ DGifSlurpMono(GifFileType * GifFile, SavedImage *TrailingExtensions) +@@ -232,20 +234,20 @@ } case EXTENSION_RECORD_TYPE: { @@ -55,7 +54,7 @@ index 8dee0eb..564beed 100644 } break; } -@@ -303,12 +305,19 @@ gdip_load_gif_image (void *stream, GpImage **image, BOOL from_file) +@@ -303,12 +305,19 @@ result = NULL; loop_counter = FALSE; @@ -76,7 +75,25 @@ index 8dee0eb..564beed 100644 if (gif == NULL) { goto error; } -@@ -660,11 +669,22 @@ gdip_save_gif_image (void *stream, GpImage *image, BOOL from_file) +@@ -581,7 +590,7 @@ + } + + FreeExtensionMono(&global_extensions); +- DGifCloseFile (gif); ++ DGifCloseFile (gif, NULL); + + *image = result; + return Ok; +@@ -597,7 +606,7 @@ + + if (gif != NULL) { + FreeExtensionMono (&global_extensions); +- DGifCloseFile (gif); ++ DGifCloseFile (gif, NULL); + } + + *image = NULL; +@@ -660,11 +669,22 @@ return InvalidParameter; } @@ -99,7 +116,7 @@ index 8dee0eb..564beed 100644 if (!fp) { return FileNotFound; -@@ -848,8 +868,15 @@ gdip_save_gif_image (void *stream, GpImage *image, BOOL from_file) +@@ -848,8 +868,15 @@ Buffer[0] = 1; Buffer[1] = ptr[0]; Buffer[2] = ptr[1]; @@ -115,3 +132,12 @@ index 8dee0eb..564beed 100644 } } +@@ -923,7 +950,7 @@ + } + } + +- EGifCloseFile (fp); ++ EGifCloseFile (fp, NULL); + + return Ok; +