From e71fd36c248ba03266e64e331c60c01195aaa26e Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 22 Jul 2015 17:30:11 -0300 Subject: [PATCH] Fix gif_format.cpp compilation on Linux and with giflib 4 --- src/app/file/gif_format.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/file/gif_format.cpp b/src/app/file/gif_format.cpp index f66bbe3c5..f94cd99eb 100644 --- a/src/app/file/gif_format.cpp +++ b/src/app/file/gif_format.cpp @@ -37,11 +37,13 @@ #define posix_lseek _lseek #else #include - #define posix_lseek _lseek + #define posix_lseek lseek #endif #if GIFLIB_MAJOR < 5 #define GifMakeMapObject MakeMapObject +#define GifFreeMapObject FreeMapObject +#define GifBitSize BitSize #endif namespace app { @@ -795,16 +797,16 @@ private: memcpy(extension_bytes, "NETSCAPE2.0", 11); if (EGifPutExtensionFirst(m_gifFile, APPLICATION_EXT_FUNC_CODE, 11, extension_bytes) == GIF_ERROR) - throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); + throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)m_frameNum); extension_bytes[0] = 1; extension_bytes[1] = (m_loop & 0xff); extension_bytes[2] = (m_loop >> 8) & 0xff; if (EGifPutExtensionNext(m_gifFile, APPLICATION_EXT_FUNC_CODE, 3, extension_bytes) == GIF_ERROR) - throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); + throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)m_frameNum); if (EGifPutExtensionLast(m_gifFile, APPLICATION_EXT_FUNC_CODE, 0, NULL) == GIF_ERROR) - throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)frame_num); + throw Exception("Error writing GIF graphics extension record for frame %d.\n", (int)m_frameNum); #endif }