From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Makoto Fujiwara Newsgroups: gmane.emacs.bugs Subject: bug#17790: GIFlib-5.1.0 or former conditional Date: Tue, 17 Jun 2014 10:49:19 +0900 Message-ID: References: <0l38f56c2h.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1402969897 5107 80.91.229.3 (17 Jun 2014 01:51:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Jun 2014 01:51:37 +0000 (UTC) To: 17790@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 17 03:51:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WwiYY-00025T-5s for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jun 2014 03:51:26 +0200 Original-Received: from localhost ([::1]:46930 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwiYT-0005QA-Jq for geb-bug-gnu-emacs@m.gmane.org; Mon, 16 Jun 2014 21:51:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33877) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwiYK-0005Q2-SG for bug-gnu-emacs@gnu.org; Mon, 16 Jun 2014 21:51:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwiYA-0004Nm-JE for bug-gnu-emacs@gnu.org; Mon, 16 Jun 2014 21:51:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwiYA-0004Ni-FY for bug-gnu-emacs@gnu.org; Mon, 16 Jun 2014 21:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WwiYA-0005km-38 for bug-gnu-emacs@gnu.org; Mon, 16 Jun 2014 21:51:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <0l38f56c2h.fsf@fencepost.gnu.org> Resent-From: Makoto Fujiwara Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jun 2014 01:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17790 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17790-submit@debbugs.gnu.org id=B17790.140296980222034 (code B ref 17790); Tue, 17 Jun 2014 01:51:02 +0000 Original-Received: (at 17790) by debbugs.gnu.org; 17 Jun 2014 01:50:02 +0000 Original-Received: from localhost ([127.0.0.1]:49774 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WwiXA-0005j0-DF for submit@debbugs.gnu.org; Mon, 16 Jun 2014 21:50:01 -0400 Original-Received: from gw.ki.nu ([218.44.234.233]:17850 helo=mx.ki.nu) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WwiX5-0005ih-ST for 17790@debbugs.gnu.org; Mon, 16 Jun 2014 21:49:58 -0400 Original-Received: from modena.i.ki.nu.ki.nu (modena.ipv6.ki.nu [IPv6:2001:218:463:1::232]) by mx.ki.nu (8.14.5/8.14.2-Mail) with ESMTP id s5H1oGJ4006225; Tue, 17 Jun 2014 10:50:16 +0900 (JST) User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?Q?Goj=C5=8D?=) APEL/10.8 Emacs/24.4.50 (x86_64--netbsd) MULE/6.0 (HANACHIRUSATO) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:90458 Archived-At: Thank you, I am now testing with following patch. (OK with giflib-5.1.0 and 5.0.6, on NetBSD/amd64 6.1.4) Thanks a lot, --- Makoto Fujiwara, Chiba, Japan, Narita Airport and Disneyland prefecture. $NetBSD$ mage.c:7417:7: error: too few arguments to function 'DGifCloseFile' emacs-current/work/.buildlink/include/gif_lib.h:183:9: note: declared here --- src/image.c.orig 2014-06-15 09:25:05.000000000 +0900 +++ src/image.c 2014-06-17 08:46:30.000000000 +0900 @@ -7410,12 +7410,20 @@ gif_load (struct frame *f, struct image #endif } +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + int * return_value_p; +#endif /* Before reading entire contents, check the declared image size. */ if (!check_image_size (f, gif->SWidth, gif->SHeight)) { image_error ("Invalid image size (see `max-image-size')", Qnil, Qnil); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } /* Read entire contents. */ @@ -7423,8 +7431,13 @@ gif_load (struct frame *f, struct image if (rc == GIF_ERROR || gif->ImageCount <= 0) { image_error ("Error reading `%s'", img->spec, Qnil); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } /* Which sub-image are we to display? */ @@ -7435,8 +7448,13 @@ gif_load (struct frame *f, struct image { image_error ("Invalid image number `%s' in image `%s'", image_number, img->spec); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } } @@ -7453,8 +7471,13 @@ 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); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } /* Check that the selected subimages fit. It's not clear whether @@ -7471,16 +7494,26 @@ gif_load (struct frame *f, struct image && 0 <= subimg_left && subimg_left <= width - subimg_width)) { image_error ("Subimage does not fit in image", Qnil, Qnil); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } } /* Create the X image and pixmap. */ if (!image_create_x_image_and_pixmap (f, img, width, height, 0, &ximg, 0)) { +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); + return *return_value_p; +#else fn_DGifCloseFile (gif); return 0; +#endif } /* Clear the part of the screen image not covered by the image. @@ -7650,7 +7683,11 @@ gif_load (struct frame *f, struct image Fcons (make_number (gif->ImageCount), img->lisp_data)); +#if (GIFLIB_MAJOR == 5) && (GIFLIB_MINOR > 0) + fn_DGifCloseFile (gif, return_value_p); +#else fn_DGifCloseFile (gif); +#endif /* Maybe fill in the background field while we have ximg handy. */ if (NILP (image_spec_value (img->spec, QCbackground, NULL)))