From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#8640: 24.0.50; no pbm support on cygwin Date: Mon, 9 May 2011 12:54:49 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304938579 1128 80.91.229.12 (9 May 2011 10:56:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 9 May 2011 10:56:19 +0000 (UTC) Cc: 8640@debbugs.gnu.org To: Katsumi Yamaoka Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 09 12:56:13 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QJO8F-0003IW-Bs for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2011 12:56:07 +0200 Original-Received: from localhost ([::1]:35454 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJO8E-000411-AR for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 May 2011 06:56:06 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:59207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJO8B-0003yg-JT for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 06:56:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJO8A-0002aK-PB for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 06:56:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:57536) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJO8A-0002aD-LA for bug-gnu-emacs@gnu.org; Mon, 09 May 2011 06:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QJO8A-0001my-2q; Mon, 09 May 2011 06:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 09 May 2011 10:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8640-submit@debbugs.gnu.org id=B8640.13049385416844 (code B ref 8640); Mon, 09 May 2011 10:56:02 +0000 Original-Received: (at 8640) by debbugs.gnu.org; 9 May 2011 10:55:41 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJO7o-0001mL-Vh for submit@debbugs.gnu.org; Mon, 09 May 2011 06:55:41 -0400 Original-Received: from mail-qy0-f172.google.com ([209.85.216.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QJO7m-0001m8-O9 for 8640@debbugs.gnu.org; Mon, 09 May 2011 06:55:39 -0400 Original-Received: by qyk29 with SMTP id 29so837579qyk.3 for <8640@debbugs.gnu.org>; Mon, 09 May 2011 03:55:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=pNoSbB1NO9lHY568gA+DhRr+5ma40t1AJ5jyR2OKaqU=; b=jrGxMD+FTSqKcNR/tTSYlJ6hqFR81lXcnd006PzSeefKNXySkW2WG9eJ9FCiq3if+G Ckrhavja//VRO7HP943paUUZ67KFFRe4SNhMNNdTWQS6PPDZgBDqeNaPofic4UeZ9meF qbnMtJPyvsxtEC8/lJ8JUX9rRK5j+lZGFXiW0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=EZBMMSisERys15ClR88gUDWPBI5mtpUP1x/qYR6CoYGBtwlwZHbzoK0AMqAM65l3Ti 4Xm9t3foyY2YcAkF9+iC7gR57lmu4sKPRhOBJm40hapKtn2Pv0NI00U0ZDnZxUe3Msjo V+sEzHc4oHOV0x1nACNRebHXiu1dBwUfdYL7Y= Original-Received: by 10.229.43.224 with SMTP id x32mr4941623qce.57.1304938533098; Mon, 09 May 2011 03:55:33 -0700 (PDT) Original-Received: by 10.229.91.210 with HTTP; Mon, 9 May 2011 03:54:49 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 09 May 2011 06:56:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:46348 Archived-At: > pbm image is not available in Emacs trunk built on cygwin at least > after May 6: (image-type-available-p 'pbm) =3D> nil > Whereas png, jpeg, gif, xpm, etc. are all ok. xbm is not available either. And of course is not cygwin-specific. > I guess this is due > to the recent changes in image.c. Yes. > Any hint? More than a hint. I moved the library cache variable to w32 code, turned CACHE_IMAGE_TYPE into a noop on non-Windows, and removed the check on init-image-library. But I overlook the fact that the predefined image types rely on being marked in the library cache as available. That's because `image-type-available-p' always goes through `init-image-library'. Now, the fix is simple (the patch below fixes the problem), but we should think whether it is cleaner to restore the library-cache to a non-Windows specific code, or mark the only two predefined image types in any other way, as the code below does. It's a bit ad-hoc, but having the image types in the library cache, when they are not, in fact, loaded from a library, is also a bit ugly. Opinions and comments anyone? =C2=A0 =C2=A0 Juanma =3D=3D=3D modified file 'src/image.c' --- src/image.c 2011-05-06 06:30:56 +0000 +++ src/image.c 2011-05-09 10:53:21 +0000 @@ -8602,6 +8602,11 @@ of `dynamic-library-alist', which see). */) (Lisp_Object type, Lisp_Object libraries) { + + /* Types pbm and xbm are predefined and always available. */ + if (EQ (type, Qpbm) || EQ (type, Qxbm)) + return Qt; + #ifdef HAVE_NTGUI /* Don't try to reload the library. */ Lisp_Object tested =3D Fassq (type, Vlibrary_cache);