57 lines
2.2 KiB
Diff
57 lines
2.2 KiB
Diff
diff --git a/configure.ac b/configure.ac
|
|
index 62f53a3..ad9d948 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -2659,15 +2659,15 @@ LIBGIF=
|
|
if test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
|
|
|| test "${HAVE_W32}" = "yes"; then
|
|
AC_CHECK_HEADER(gif_lib.h,
|
|
-# EGifPutExtensionLast only exists from version libungif-4.1.0b1.
|
|
+# EGifPutExtensionTrailer only exists from version libungif-4.1.0b1.
|
|
# Earlier versions can crash Emacs.
|
|
- [AC_CHECK_LIB(gif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=maybe)])
|
|
+ [AC_CHECK_LIB(gif, EGifPutExtensionTrailer, HAVE_GIF=yes, HAVE_GIF=maybe)])
|
|
|
|
if test "$HAVE_GIF" = yes; then
|
|
LIBGIF=-lgif
|
|
elif test "$HAVE_GIF" = maybe; then
|
|
# If gif_lib.h but no libgif, try libungif.
|
|
- AC_CHECK_LIB(ungif, EGifPutExtensionLast, HAVE_GIF=yes, HAVE_GIF=no)
|
|
+ AC_CHECK_LIB(ungif, EGifPutExtensionTrailer, HAVE_GIF=yes, HAVE_GIF=no)
|
|
test "$HAVE_GIF" = yes && LIBGIF=-lungif
|
|
fi
|
|
|
|
diff --git a/src/image.c b/src/image.c
|
|
index ce36699..bbc5c49 100644
|
|
--- a/src/image.c
|
|
+++ b/src/image.c
|
|
@@ -7101,8 +7101,8 @@ gif_image_p (Lisp_Object object)
|
|
/* GIF library details. */
|
|
DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
|
|
DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
|
|
-DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
|
|
-DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *));
|
|
+DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc, int*));
|
|
+DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *, int*));
|
|
|
|
static bool
|
|
init_gif_functions (void)
|
|
@@ -7192,7 +7192,7 @@ gif_load (struct frame *f, struct image *img)
|
|
}
|
|
|
|
/* Open the GIF file. */
|
|
- gif = fn_DGifOpenFileName (SSDATA (file));
|
|
+ gif = fn_DGifOpenFileName (SSDATA (file), NULL);
|
|
if (gif == NULL)
|
|
{
|
|
image_error ("Cannot open `%s'", file, Qnil);
|
|
@@ -7213,7 +7213,7 @@ gif_load (struct frame *f, struct image *img)
|
|
memsrc.len = SBYTES (specified_data);
|
|
memsrc.index = 0;
|
|
|
|
- gif = fn_DGifOpen (&memsrc, gif_read_from_memory);
|
|
+ gif = fn_DGifOpen (&memsrc, gif_read_from_memory, NULL);
|
|
if (!gif)
|
|
{
|
|
image_error ("Cannot open memory source `%s'", img->spec, Qnil);
|