diff options
author | Mark Brand <mabrand@mabrand.nl> | 2012-05-24 20:28:25 (GMT) |
---|---|---|
committer | Mark Brand <mabrand@mabrand.nl> | 2012-05-24 20:28:25 (GMT) |
commit | 8c72b3b7f551560072a3d63a726b4367f33733ac (patch) | |
tree | 119961e6e27cb7909430d4ca74f520a8821dcf1f /src/gdal-1-fixes.patch | |
parent | 326d96d091c892b1288825772ba8c57ee04c75ea (diff) | |
download | mxe-8c72b3b7f551560072a3d63a726b4367f33733ac.zip mxe-8c72b3b7f551560072a3d63a726b4367f33733ac.tar.gz mxe-8c72b3b7f551560072a3d63a726b4367f33733ac.tar.bz2 |
package gdal: add missing upstream patch
Diffstat (limited to 'src/gdal-1-fixes.patch')
-rw-r--r-- | src/gdal-1-fixes.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/gdal-1-fixes.patch b/src/gdal-1-fixes.patch new file mode 100644 index 0000000..b0cf98e --- /dev/null +++ b/src/gdal-1-fixes.patch @@ -0,0 +1,54 @@ +This file is part of MXE. +See index.html for further information. + +Taken from http://trac.osgeo.org/gdal/changeset/24491?format=diff&new=24491 + +Index: gdal/frmts/gif/gifdataset.cpp +=================================================================== +--- gdal/frmts/gif/gifdataset.cpp (revision 23621) ++++ gdal/frmts/gif/gifdataset.cpp (revision 24491) +@@ -471,4 +471,26 @@ + + /************************************************************************/ ++/* GDALPrintGifError() */ ++/************************************************************************/ ++ ++static void GDALPrintGifError(const char* pszMsg) ++{ ++/* GIFLIB_MAJOR is only defined in libgif >= 4.2.0 */ ++/* libgif 4.2.0 has retired PrintGifError() and added GifErrorString() */ ++#if defined(GIFLIB_MAJOR) && defined(GIFLIB_MINOR) && \ ++ ((GIFLIB_MAJOR == 4 && GIFLIB_MINOR >= 2) || GIFLIB_MAJOR > 4) ++ /* Static string actually, hence the const char* cast */ ++ const char* pszGIFLIBError = (const char*) GifErrorString(); ++ if (pszGIFLIBError == NULL) ++ pszGIFLIBError = "Unknown error"; ++ CPLError( CE_Failure, CPLE_AppDefined, ++ "%s. GIFLib Error : %s", pszMsg, pszGIFLIBError ); ++#else ++ PrintGifError(); ++ CPLError( CE_Failure, CPLE_AppDefined, "%s", pszMsg ); ++#endif ++} ++ ++/************************************************************************/ + /* CreateCopy() */ + /************************************************************************/ +@@ -597,7 +619,5 @@ + { + FreeMapObject(psGifCT); +- PrintGifError(); +- CPLError( CE_Failure, CPLE_AppDefined, +- "Error writing gif file." ); ++ GDALPrintGifError("Error writing gif file."); + EGifCloseFile(hGifFile); + VSIFCloseL( fp ); +@@ -623,7 +643,5 @@ + if (EGifPutImageDesc(hGifFile, 0, 0, nXSize, nYSize, bInterlace, NULL) == GIF_ERROR ) + { +- PrintGifError(); +- CPLError( CE_Failure, CPLE_AppDefined, +- "Error writing gif file." ); ++ GDALPrintGifError("Error writing gif file."); + EGifCloseFile(hGifFile); + VSIFCloseL( fp ); |