]>
Commit | Line | Data |
---|---|---|
779b0eec JB |
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 | |
3 | @@ -386,13 +386,21 @@ | |
4 | CPLDebug( "GIF", | |
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 ); | |
9 | +#else | |
10 | DGifCloseFile( hGifFile ); | |
11 | +#endif | |
12 | VSIFCloseL( fp ); | |
13 | return NULL; | |
14 | } | |
15 | } | |
16 | ||
17 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
18 | + DGifCloseFile( hGifFile, NULL ); | |
19 | +#else | |
20 | DGifCloseFile( hGifFile ); | |
21 | +#endif | |
22 | ||
23 | VSIFSeekL( fp, 0, SEEK_SET); | |
24 | ||
25 | @@ -417,7 +425,11 @@ | |
26 | if( nGifErr != GIF_OK || hGifFile->SavedImages == NULL ) | |
27 | { | |
28 | VSIFCloseL( fp ); | |
29 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
30 | + DGifCloseFile(hGifFile, NULL); | |
31 | +#else | |
32 | DGifCloseFile(hGifFile); | |
33 | +#endif | |
34 | ||
35 | if( nGifErr == D_GIF_ERR_DATA_TOO_BIG ) | |
36 | { | |
37 | @@ -649,7 +661,11 @@ | |
38 | { | |
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); | |
43 | +#else | |
44 | EGifCloseFile(hGifFile); | |
45 | +#endif | |
46 | VSIFCloseL( fp ); | |
47 | return NULL; | |
48 | } | |
49 | @@ -673,7 +689,11 @@ | |
50 | if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR ) | |
51 | { | |
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); | |
55 | +#else | |
56 | EGifCloseFile(hGifFile); | |
57 | +#endif | |
58 | VSIFCloseL( fp ); | |
59 | return NULL; | |
60 | } | |
61 | @@ -756,7 +776,11 @@ | |
62 | /* -------------------------------------------------------------------- */ | |
63 | /* cleanup */ | |
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) | |
67 | +#else | |
68 | if (EGifCloseFile(hGifFile) == GIF_ERROR) | |
69 | +#endif | |
70 | { | |
71 | CPLError( CE_Failure, CPLE_AppDefined, | |
72 | "EGifCloseFile() failed.\n" ); | |
73 | @@ -807,7 +831,11 @@ | |
74 | ||
75 | error: | |
76 | if (hGifFile) | |
77 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
78 | + EGifCloseFile(hGifFile, NULL); | |
79 | +#else | |
80 | EGifCloseFile(hGifFile); | |
81 | +#endif | |
82 | if (fp) | |
83 | VSIFCloseL( fp ); | |
84 | if (pabyScanline) | |
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 | |
87 | @@ -339,7 +339,11 @@ | |
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 ); | |
93 | +#else | |
94 | DGifCloseFile( hGifFile ); | |
95 | +#endif | |
96 | ||
97 | /* -------------------------------------------------------------------- */ | |
98 | /* If we are actually reopening, then we assume that access to */ | |
99 | @@ -413,7 +417,11 @@ | |
100 | ||
101 | if( RecordType != IMAGE_DESC_RECORD_TYPE ) | |
102 | { | |
103 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
104 | + DGifCloseFile( hGifFile, NULL ); | |
105 | +#else | |
106 | DGifCloseFile( hGifFile ); | |
107 | +#endif | |
108 | hGifFile = NULL; | |
109 | ||
110 | CPLError( CE_Failure, CPLE_OpenFailed, | |
111 | @@ -423,7 +431,11 @@ | |
112 | ||
113 | if (DGifGetImageDesc(hGifFile) == GIF_ERROR) | |
114 | { | |
115 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
116 | + DGifCloseFile( hGifFile, NULL ); | |
117 | +#else | |
118 | DGifCloseFile( hGifFile ); | |
119 | +#endif | |
120 | hGifFile = NULL; | |
121 | ||
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 | |
125 | @@ -82,7 +82,11 @@ | |
126 | } | |
127 | ||
128 | if( hGifFile ) | |
129 | +#if defined(GIFLIB_MAJOR) && ((GIFLIB_MAJOR > 5) || ((GIFLIB_MAJOR == 5) && defined(GIFLIB_MINOR) && (GIFLIB_MINOR >= 1))) | |
130 | + DGifCloseFile( hGifFile, NULL ); | |
131 | +#else | |
132 | DGifCloseFile( hGifFile ); | |
133 | +#endif | |
134 | ||
135 | if( fp != NULL ) | |
136 | VSIFCloseL( fp ); |