1 --- gdal-1.11.0/frmts/gif/gifdataset.cpp.orig 2014-04-16 22:04:33.000000000 +0200
2 +++ gdal-1.11.0/frmts/gif/gifdataset.cpp 2014-06-14 16:10:22.245009208 +0200
5 "Due to limitations of the GDAL GIF driver we deliberately avoid\n"
6 "opening large GIF files (larger than 100 megapixels).");
7 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
8 + DGifCloseFile( hGifFile, NULL );
10 DGifCloseFile( hGifFile );
17 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
18 + DGifCloseFile( hGifFile, NULL );
20 DGifCloseFile( hGifFile );
23 VSIFSeekL( fp, 0, SEEK_SET);
26 if( nGifErr != GIF_OK || hGifFile->SavedImages == NULL )
29 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
30 + DGifCloseFile(hGifFile, NULL);
32 DGifCloseFile(hGifFile);
35 if( nGifErr == D_GIF_ERR_DATA_TOO_BIG )
39 GifFreeMapObject(psGifCT);
40 GDALPrintGifError(hGifFile, "Error writing gif file.");
41 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
42 + EGifCloseFile(hGifFile, NULL);
44 EGifCloseFile(hGifFile);
50 if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR )
52 GDALPrintGifError(hGifFile, "Error writing gif file.");
53 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
54 + EGifCloseFile(hGifFile, NULL);
56 EGifCloseFile(hGifFile);
62 /* -------------------------------------------------------------------- */
64 /* -------------------------------------------------------------------- */
65 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
66 + if (EGifCloseFile(hGifFile, NULL) == GIF_ERROR)
68 if (EGifCloseFile(hGifFile) == GIF_ERROR)
71 CPLError( CE_Failure, CPLE_AppDefined,
72 "EGifCloseFile() failed.\n" );
77 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
78 + EGifCloseFile(hGifFile, NULL);
80 EGifCloseFile(hGifFile);
85 --- gdal-1.11.0/frmts/gif/biggifdataset.cpp.orig 2014-04-16 22:04:33.000000000 +0200
86 +++ gdal-1.11.0/frmts/gif/biggifdataset.cpp 2014-06-14 17:36:54.164900991 +0200
88 /* If the file is already open, close it so we can restart. */
89 /* -------------------------------------------------------------------- */
90 if( hGifFile != NULL )
91 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
92 + DGifCloseFile( hGifFile, NULL );
94 DGifCloseFile( hGifFile );
97 /* -------------------------------------------------------------------- */
98 /* If we are actually reopening, then we assume that access to */
101 if( RecordType != IMAGE_DESC_RECORD_TYPE )
103 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
104 + DGifCloseFile( hGifFile, NULL );
106 DGifCloseFile( hGifFile );
110 CPLError( CE_Failure, CPLE_OpenFailed,
113 if (DGifGetImageDesc(hGifFile) == GIF_ERROR)
115 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
116 + DGifCloseFile( hGifFile, NULL );
118 DGifCloseFile( hGifFile );
122 CPLError( CE_Failure, CPLE_OpenFailed,
123 --- gdal-1.11.0/frmts/gif/gifabstractdataset.cpp.orig 2014-04-16 22:04:33.000000000 +0200
124 +++ gdal-1.11.0/frmts/gif/gifabstractdataset.cpp 2014-06-14 18:52:07.828140246 +0200
129 +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1)))
130 + DGifCloseFile( hGifFile, NULL );
132 DGifCloseFile( hGifFile );