handle giflib api change, reported by naddy

This commit is contained in:
sthen 2015-03-28 16:06:48 +00:00
parent f8bf0c7112
commit 72f8811f16
3 changed files with 55 additions and 9 deletions

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_osgPlugins_gif_ReaderWriterGIF_cpp,v 1.1 2015/03/28 16:06:48 sthen Exp $
--- src/osgPlugins/gif/ReaderWriterGIF.cpp.orig Sat Mar 28 16:04:57 2015
+++ src/osgPlugins/gif/ReaderWriterGIF.cpp Sat Mar 28 16:05:01 2015
@@ -561,7 +561,7 @@ GifImageStream** obj)
*width_ret = giffile->SWidth;
*height_ret = giffile->SHeight;
*numComponents_ret = 4;
- DGifCloseFile(giffile);
+ DGifCloseFile(giffile, NULL);
return buffer;
}

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-src_image_c,v 1.3 2013/09/25 07:58:46 sthen Exp $
$OpenBSD: patch-src_image_c,v 1.4 2015/03/28 16:06:48 sthen Exp $
Fix build with giflib-5.0
Fix build with giflib-5.1
--- src/image.c.orig Wed Feb 8 06:02:15 2012
+++ src/image.c Thu Sep 19 05:01:14 2013
--- src/image.c.orig Wed Dec 3 11:58:33 2014
+++ src/image.c Sat Mar 28 16:03:38 2015
@@ -905,7 +905,7 @@ int gif2bitmap(char *inbuf, int insize, raw_bitmap **o
desc.size=insize;
desc.x.pos=0;
@ -13,6 +13,15 @@ Fix build with giflib-5.0
return( IMG_RET_ERR_UNKNOWN + IMG_RET_FLG_WHILE_DECOMP);//more possible reasons
bmp = new_raw_bitmap();
@@ -1083,7 +1083,7 @@ int gif2bitmap(char *inbuf, int insize, raw_bitmap **o
}
bmp->pal_bpp = bmp->bpp;
- DGifCloseFile(GifFile);
+ DGifCloseFile(GifFile, NULL);
return IMG_RET_OK;
}
@@ -1738,7 +1738,7 @@ static int bitmap2jp2 (raw_bitmap *bmp, float rate, ch
cmptparm->width = cwidth [cmptno];
cmptparm->height = cheight [cmptno];

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-src_gifcodec_c,v 1.2 2014/07/18 16:00:28 ajacoutot Exp $
$OpenBSD: patch-src_gifcodec_c,v 1.3 2015/03/28 16:06:48 sthen Exp $
giflib 5.0+
giflib 5.1+
http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/graphics/libgdiplus/patches/patch-src_gifcodec.c?rev=1.2
--- src/gifcodec.c.orig Fri Dec 2 18:23:12 2011
+++ src/gifcodec.c Fri Jul 18 15:30:15 2014
--- src/gifcodec.c.orig Fri Dec 2 17:23:12 2011
+++ src/gifcodec.c Sat Mar 28 16:04:03 2015
@@ -39,8 +39,12 @@ GUID gdip_gif_image_format_guid = {0xb96b3cb0U, 0x0728
#include "gifcodec.h"
@ -71,6 +71,24 @@ http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/graphics/libgdiplus/patche
}
if (gif == NULL) {
@@ -581,7 +603,7 @@ gdip_load_gif_image (void *stream, GpImage **image, BO
}
FreeExtensionMono(&global_extensions);
- DGifCloseFile (gif);
+ DGifCloseFile (gif, NULL);
*image = result;
return Ok;
@@ -597,7 +619,7 @@ error:
if (gif != NULL) {
FreeExtensionMono (&global_extensions);
- DGifCloseFile (gif);
+ DGifCloseFile (gif, NULL);
}
*image = NULL;
@@ -661,9 +683,17 @@ gdip_save_gif_image (void *stream, GpImage *image, BOO
}
@ -163,7 +181,14 @@ http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/graphics/libgdiplus/patche
if (red != NULL) {
GdipFree (red);
}
@@ -929,7 +986,11 @@ gdip_save_gif_image (void *stream, GpImage *image, BOO
@@ -923,13 +980,17 @@ gdip_save_gif_image (void *stream, GpImage *image, BOO
}
}
- EGifCloseFile (fp);
+ EGifCloseFile (fp, NULL);
return Ok;
error:
if (cmap != NULL) {