diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2014-06-20 13:11:14 +0200 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2014-06-20 13:11:14 +0200 |
commit | 1170e23e38b8bf619928d30fd107d8753e71989f (patch) | |
tree | c0b87698ff8e03837cb7f26808289c4521c223f9 /src | |
parent | ac61822e72b401a37b26e77b2c2b716e21ba46b7 (diff) | |
download | mirror-meh-1170e23e38b8bf619928d30fd107d8753e71989f.tar.gz mirror-meh-1170e23e38b8bf619928d30fd107d8753e71989f.tar.bz2 mirror-meh-1170e23e38b8bf619928d30fd107d8753e71989f.zip |
fixed for API change in DGifCloseFile (giflib 5.1)
Diffstat (limited to 'src')
-rw-r--r-- | src/gif.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -96,7 +96,24 @@ error: void gif_close(struct image *img){ struct gif_t *g = (struct gif_t *)img; +#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) + int ret; +#endif + +#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && (GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1) + DGifCloseFile(g->gif,&ret); + if(ret != GIF_OK) { +#if defined(GIFLIB_MAJOR) && GIFLIB_MAJOR >= 5 + fprintf(stderr, "GIFLIB: %s\n", GifErrorString(ret)); +#elif defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) + fprintf(stderr, "GIFLIB: %s\n", GifErrorString()); +#else + PrintGifError(); +#endif + } +#else DGifCloseFile(g->gif); +#endif fclose(g->f); } |