}
if (DGifSlurp(GifFile) == GIF_ERROR) {
fprintf(stderr, "gifconv_gif2lossless: DGifSlurp failed\n");
-#if GIFLIB_MAJOR >= 5
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
DGifCloseFile(GifFile, NULL);
#else
DGifCloseFile(GifFile);
bpp = ColorMap->BitsPerPixel;
if (bpp > 8) {
fprintf(stderr, "gifconv_gif2lossless: bpp=%d not implemented. accept only bpp <= 8\n", bpp);
-#if GIFLIB_MAJOR >= 5
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
DGifCloseFile(GifFile, NULL);
#else
DGifCloseFile(GifFile);
* destruct
*/
if (GifFile) {
-#if GIFLIB_MAJOR >= 5
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
DGifCloseFile(GifFile, NULL);
#else
DGifCloseFile(GifFile);
free(gif_image_data);
if (GifFile) {
-#if GIFLIB_MAJOR >= 5
+#if GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1 || GIFLIB_MAJOR > 5
EGifCloseFile(GifFile, NULL);
#else
EGifCloseFile(GifFile);