blob: 6437515d6f233358d9bb9db015ac6ffe6796596f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--- a/Imlib/load.c 2012-06-16 20:19:27.000000000 +0200
+++ b/Imlib/load.c 2012-06-16 20:19:56.000000000 +0200
@@ -420,6 +420,21 @@
#endif /* HAVE_LIBTIFF */
#ifdef HAVE_LIBGIF
+
+#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4)
+static void PrintGifError(void) {
+#if GIFLIB_MAJOR >= 5
+ fprintf(stderr, "GIF-LIB error (exact reporting not implemented)\n");
+#else
+ const char * errorString = GifErrorString();
+ if (errorString)
+ fprintf(stderr, "GIF-LIB error: %s\n", errorString);
+ else
+ fprintf(stderr, "GIF-LIB undefined error: %d\n", GifError());
+#endif
+}
+#endif
+
unsigned char *
_LoadGIF(ImlibData * id, FILE *f, int *w, int *h, int *t)
{
|