From e1649f42cf5dc0b85e15c58dbf7fbf12b8449772 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Fri, 28 Dec 2012 13:57:46 +0100 Subject: [PATCH] pictureviewer: compatibility with giflib-5.x Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/2c07e391a1660b712c2b756a9acf71cf78ecb197 Author: Stefan Seyfried Date: 2012-12-28 (Fri, 28 Dec 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/pictureviewer/gif.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/driver/pictureviewer/gif.cpp b/src/driver/pictureviewer/gif.cpp index a37238772..4b0a3b23e 100644 --- a/src/driver/pictureviewer/gif.cpp +++ b/src/driver/pictureviewer/gif.cpp @@ -59,8 +59,13 @@ int fh_gif_load(const char *name,unsigned char **buffer,int* /*xp*/,int* /*yp*/) GifRecordType rt; ColorMapObject *cmap; int cmaps; +#if GIFLIB_MAJOR >= 5 + int error; + gft=DGifOpenFileName(name, &error); +#else gft=DGifOpenFileName(name); +#endif if(gft==NULL) gflush; do { @@ -128,8 +133,13 @@ int fh_gif_getsize(const char *name,int *x,int *y, int /*wanted_width*/, int /*w GifByteType *extension; int extcode; GifRecordType rt; +#if GIFLIB_MAJOR >= 5 + int error; + gft=DGifOpenFileName(name, &error); +#else gft=DGifOpenFileName(name); +#endif if(gft==NULL) gflush; do {