Accepting request 247309 from home:jengelh:branches:editors

- Update emacs-24.3-giflib5.diff to support giflib7-5.1.0 API

OBS-URL: https://build.opensuse.org/request/show/247309
OBS-URL: https://build.opensuse.org/package/show/editors/emacs?expand=0&rev=153
This commit is contained in:
Dr. Werner Fink 2014-09-03 08:39:37 +00:00 committed by Git OBS Bridge
parent 20a2b38481
commit 587f9989e2
3 changed files with 90 additions and 5 deletions

View File

@ -1,6 +1,33 @@
--- src/image.c
+++ src/image.c 2013-05-21 15:49:41.945819346 +0000
@@ -7192,7 +7192,11 @@ gif_load (struct frame *f, struct image
---
src/image.c | 29 +++++++++++++++++++++++------
1 file changed, 23 insertions(+), 6 deletions(-)
Index: emacs-24.3/src/image.c
===================================================================
--- emacs-24.3.orig/src/image.c
+++ emacs-24.3/src/image.c
@@ -7095,11 +7095,20 @@ gif_image_p (Lisp_Object object)
#endif /* HAVE_NTGUI */
+#if !defined(GIFLIB_MAJOR) || !(GIFLIB_MAJOR > 5 || \
+ GIFLIB_MAJOR == 5 && GIFLIB_MINOR >= 1)
+# define GIF7
+#endif
#ifdef WINDOWSNT
/* GIF library details. */
+#ifdef GIF7
+DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *, int *));
+#else
DEF_IMGLIB_FN (int, DGifCloseFile, (GifFileType *));
+#define DGifCloseFile(a, b) DGifCloseFile(a)
+#endif
DEF_IMGLIB_FN (int, DGifSlurp, (GifFileType *));
DEF_IMGLIB_FN (GifFileType *, DGifOpen, (void *, InputFunc));
DEF_IMGLIB_FN (GifFileType *, DGifOpenFileName, (const char *));
@@ -7192,7 +7201,11 @@ gif_load (struct frame *f, struct image
}
/* Open the GIF file. */
@ -12,7 +39,7 @@
if (gif == NULL)
{
image_error ("Cannot open `%s'", file, Qnil);
@@ -7213,7 +7217,11 @@ gif_load (struct frame *f, struct image
@@ -7213,7 +7226,11 @@ gif_load (struct frame *f, struct image
memsrc.len = SBYTES (specified_data);
memsrc.index = 0;
@ -24,3 +51,56 @@
if (!gif)
{
image_error ("Cannot open memory source `%s'", img->spec, Qnil);
@@ -7225,7 +7242,7 @@ gif_load (struct frame *f, struct image
if (!check_image_size (f, gif->SWidth, gif->SHeight))
{
image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
return 0;
}
@@ -7234,7 +7251,7 @@ gif_load (struct frame *f, struct image
if (rc == GIF_ERROR || gif->ImageCount <= 0)
{
image_error ("Error reading `%s'", img->spec, Qnil);
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
return 0;
}
@@ -7246,7 +7263,7 @@ gif_load (struct frame *f, struct image
{
image_error ("Invalid image number `%s' in image `%s'",
image_number, img->spec);
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
return 0;
}
}
@@ -7264,14 +7281,14 @@ gif_load (struct frame *f, struct image
if (!check_image_size (f, width, height))
{
image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil);
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
return 0;
}
/* Create the X image and pixmap. */
if (!x_create_x_image_and_pixmap (f, width, height, 0, &ximg, &img->pixmap))
{
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
return 0;
}
@@ -7447,7 +7464,7 @@ gif_load (struct frame *f, struct image
Fcons (make_number (gif->ImageCount),
img->lisp_data));
- fn_DGifCloseFile (gif);
+ fn_DGifCloseFile (gif, NULL);
/* Maybe fill in the background field while we have ximg handy. */
if (NILP (image_spec_value (img->spec, QCbackground, NULL)))

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Sep 2 20:38:27 UTC 2014 - jengelh@inai.de
- Update emacs-24.3-giflib5.diff to support giflib7-5.1.0 API
-------------------------------------------------------------------
Fri Aug 8 14:10:51 UTC 2014 - fcrozat@suse.com

View File

@ -226,7 +226,7 @@ and most assembler-like syntaxes.
%patch20 -p0 -b .CVE-2014-3424
%patch -p0
%patch22 -p0
%patch25 -p0
%patch25 -p1
%patch26 -p1
%patch27 -p1