Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:13.2:Update
swftools
0001-build-support-for-giflib-5.x.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-build-support-for-giflib-5.x.patch of Package swftools
From beaabd9ca03ad800571eb4b7ce64d2ee4ad86bc8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt <jengelh@inai.de> Date: Wed, 26 Jun 2013 02:59:31 +0200 Subject: [PATCH] build: support for giflib-5.x The API/ABI has changed in giflib-5.x (libgif.so.6). Deal with it. --- src/gif2swf.c | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/gif2swf.c b/src/gif2swf.c index 2359da5..5e52ea8 100644 --- a/src/gif2swf.c +++ b/src/gif2swf.c @@ -222,6 +222,7 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id, int imgidx) GifFileType *gft; FILE *fi; + int ret; if ((fi = fopen(sname, "rb")) == NULL) { if (VERBOSE(1)) @@ -230,13 +231,22 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id, int imgidx) } fclose(fi); - if ((gft = DGifOpenFileName(sname)) == NULL) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + gft = DGifOpenFileName(sname, NULL); +#else + gft = DGifOpenFileName(sname); +#endif + if (gft == NULL) { fprintf(stderr, "%s is not a GIF file!\n", sname); return t; } - if (DGifSlurp(gft) != GIF_OK) { + if ((ret = DGifSlurp(gft)) != GIF_OK) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + fprintf(stderr, "GIF-LIB: %s\n", GifErrorString(ret)); +#else PrintGifError(); +#endif return t; } @@ -465,6 +475,7 @@ int CheckInputFile(char *fname, char **realname) FILE *fi; char *s = malloc(strlen(fname) + 5); GifFileType *gft; + int ret; if (!s) exit(2); @@ -488,7 +499,12 @@ int CheckInputFile(char *fname, char **realname) } fclose(fi); - if ((gft = DGifOpenFileName(s)) == NULL) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + gft = DGifOpenFileName(s, NULL); +#else + gft = DGifOpenFileName(s); +#endif + if (gft == NULL) { fprintf(stderr, "%s is not a GIF file!\n", fname); return -1; } @@ -498,8 +514,12 @@ int CheckInputFile(char *fname, char **realname) if (global.max_image_height < gft->SHeight) global.max_image_height = gft->SHeight; - if (DGifSlurp(gft) != GIF_OK) { + if ((ret = DGifSlurp(gft)) != GIF_OK) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + fprintf(stderr, "GIF-LIB: %s\n", GifErrorString(ret)); +#else PrintGifError(); +#endif return -1; } // After DGifSlurp() call, gft->ImageCount become available -- 1.8.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor