[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114602: Handle giflib 5 changes (tiny change)
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r114602: Handle giflib 5 changes (tiny change) |
Date: |
Thu, 10 Oct 2013 00:37:53 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114602
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15531
author: Barry Fishman <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-09 20:37:44 -0400
message:
Handle giflib 5 changes (tiny change)
* configure.ac: Update for giflib 5.
* src/image.c (GIFLIB_MAJOR): Ensure it's defined.
(DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
modified:
ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1538
configure.ac
configure.in-20091113204419-o5vbwnq5f7feedwu-783
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/image.c image.c-20091113204419-o5vbwnq5f7feedwu-2969
=== modified file 'ChangeLog'
--- a/ChangeLog 2013-10-08 17:49:20 +0000
+++ b/ChangeLog 2013-10-10 00:37:44 +0000
@@ -1,3 +1,7 @@
+2013-10-10 Barry Fishman <address@hidden> (tiny change)
+
+ * configure.ac: Update for giflib 5. (Bug#15531)
+
2013-10-08 Eli Zaretskii <address@hidden>
* configure.ac (HAVE_MENUS): Define unconditionally.
=== modified file 'configure.ac'
--- a/configure.ac 2013-09-26 07:37:16 +0000
+++ b/configure.ac 2013-10-10 00:37:44 +0000
@@ -3106,8 +3106,9 @@
|| test "${HAVE_W32}" = "yes"; then
AC_CHECK_HEADER(gif_lib.h,
# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
-# Earlier versions can crash Emacs.
- [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)])
+# Earlier versions can crash Emacs, but version 5.0 removes
EGifPutExtensionLast.
+ [AC_CHECK_LIB(gif, GifMakeMapObject, HAVE_GIF=yes,
+ [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes,
HAVE_GIF=maybe)])])
if test "$HAVE_GIF" = yes; then
LIBGIF=-lgif
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-10-09 22:39:57 +0000
+++ b/src/ChangeLog 2013-10-10 00:37:44 +0000
@@ -1,3 +1,8 @@
+2013-10-10 Barry Fishman <address@hidden> (tiny change)
+
+ * image.c (GIFLIB_MAJOR): Ensure it's defined.
+ (DGifOpen, DGifOpenFileName): Handle giflib 5 syntax. (Bug#15531)
+
2013-10-09 Paul Eggert <address@hidden>
* fns.c (sxhash_bool_vector): Fix buffer read overrun.
=== modified file 'src/image.c'
--- a/src/image.c 2013-09-22 09:31:55 +0000
+++ b/src/image.c 2013-10-10 00:37:44 +0000
@@ -7219,14 +7219,22 @@
#endif /* HAVE_NTGUI */
+#ifndef GIFLIB_MAJOR
+#define GIFLIB_MAJOR 0
+#endif
#ifdef WINDOWSNT
/* GIF library details. */
DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
+#if GIFLIB_MAJOR < 5
DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *));
+#else
+DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc, int *));
+DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *, int *));
+#endif
static bool
init_gif_functions (void)
@@ -7316,7 +7324,11 @@
}
/* Open the GIF file. */
+#if GIFLIB_MAJOR < 5
gif = fn_DGifOpenFileName (SSDATA (file));
+#else
+ gif = fn_DGifOpenFileName (SSDATA (file), NULL);
+#endif
if (gif == NULL)
{
image_error ("Cannot open `%s'", file, Qnil);
@@ -7337,7 +7349,11 @@
memsrc.len = SBYTES (specified_data);
memsrc.index = 0;
+#if GIFLIB_MAJOR < 5
gif = fn_DGifOpen (&memsrc, gif_read_from_memory);
+#else
+ gif = fn_DGifOpen (&memsrc, gif_read_from_memory, NULL);
+#endif
if (!gif)
{
image_error ("Cannot open memory source `%s'", img->spec, Qnil);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114602: Handle giflib 5 changes (tiny change),
Glenn Morris <=