Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 368274 Details for
Bug 486372
media-libs/imlib uses PrintGifError which was changed to GifErrorString in giflib-4.2
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
improved patch which handles giflib 4/5 based on gdal code
imlibfix.patch (text/plain), 2.77 KB, created by
Aaron Pelton
on 2014-01-20 17:49:15 UTC
(
hide
)
Description:
improved patch which handles giflib 4/5 based on gdal code
Filename:
MIME Type:
Creator:
Aaron Pelton
Created:
2014-01-20 17:49:15 UTC
Size:
2.77 KB
patch
obsolete
>--- Imlib/load.c.old 2014-01-20 12:04:16.514073763 -0500 >+++ Imlib/load.c 2014-01-20 12:05:11.663010969 -0500 >@@ -431,6 +431,29 @@ > #endif /* HAVE_LIBTIFF */ > > #ifdef HAVE_LIBGIF >+/*------------------------*/ >+static void >+_PrintGifError(GifFileType *gif) >+{ >+ /* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */ >+ /* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */ >+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \ >+ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) >+ /* Static string actually, hence the const char* cast */ >+ >+#if GIFLIB_MAJOR >= 5 >+ const char* gifliberr = (const char*) GifErrorString(gif->Error); >+#else >+ const char* gifliberr = (const char*) GifErrorString(); >+#endif >+ if (gifliberr == NULL) >+ gifliberr = "Unknown error"; >+ fprintf(stderr, "%s\n", gifliberr); >+#else >+ PrintGifError(); >+#endif >+} >+/*------------------------*/ > unsigned char * > _LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t) > { >@@ -462,14 +485,14 @@ > { > if (DGifGetRecordType(gif, &rec) == GIF_ERROR) > { >- PrintGifError(); >+ _PrintGifError(gif); > rec = TERMINATE_RECORD_TYPE; > } > if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done)) > { > if (DGifGetImageDesc(gif) == GIF_ERROR) > { >- PrintGifError(); >+ _PrintGifError(gif); > rec = TERMINATE_RECORD_TYPE; > } > *w = gif->Image.Width; >--- gdk_imlib/io-gif.c.old 2014-01-20 12:04:16.434075283 -0500 >+++ gdk_imlib/io-gif.c 2014-01-20 12:05:51.262232780 -0500 >@@ -3,6 +3,29 @@ > #include "gdk_imlib_private.h" > > #ifndef HAVE_LIBGIF >+/*------------------------*/ >+static void >+_PrintGifError(GifFileType *gif) >+{ >+ /* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */ >+ /* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */ >+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \ >+ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) >+ /* Static string actually, hence the const char* cast */ >+ >+#if GIFLIB_MAJOR >= 5 >+ const char* gifliberr = (const char*) GifErrorString(gif->Error); >+#else >+ const char* gifliberr = (const char*) GifErrorString(); >+#endif >+ if (gifliberr == NULL) >+ gifliberr = "Unknown error"; >+ fprintf(stderr, "%s\n", gifliberr); >+#else >+ PrintGifError(); >+#endif >+} >+/*------------------------*/ > unsigned char loader_gif (FILE *f, int *w, int *h, int *t) > { > return NULL; >@@ -43,14 +66,14 @@ > { > if (DGifGetRecordType(gif, &rec) == GIF_ERROR) > { >- PrintGifError(); >+ _PrintGifError(gif); > rec = TERMINATE_RECORD_TYPE; > } > if ((rec == IMAGE_DESC_RECORD_TYPE) && (!done)) > { > if (DGifGetImageDesc(gif) == GIF_ERROR) > { >- PrintGifError(); >+ _PrintGifError(gif); > rec = TERMINATE_RECORD_TYPE; > } > *w = gif->Image.Width;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 486372
:
359698
|
368256
| 368274 |
368718
|
373312
|
373314
|
373472
|
425194