From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Claudio Bley Newsgroups: gmane.emacs.devel Subject: [PATCH v2 1/5] w32: define new jpeglib-version var in order to load the correct DLL at runtime Date: Wed, 30 Oct 2013 13:43:08 +0100 Message-ID: <877gcvylnn.wl%claudio.bley@gmail.com> References: 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 1383137001 14025 80.91.229.3 (30 Oct 2013 12:43:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Oct 2013 12:43:21 +0000 (UTC) To: Emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 30 13:43:26 2013 Return-path: Envelope-to: ged-emacs-devel@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 1VbV7N-0007db-Pc for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2013 13:43:25 +0100 Original-Received: from localhost ([::1]:52204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV7N-0006Lz-EL for ged-emacs-devel@m.gmane.org; Wed, 30 Oct 2013 08:43:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV7E-0006EJ-5E for emacs-devel@gnu.org; Wed, 30 Oct 2013 08:43:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbV78-0002od-Q4 for emacs-devel@gnu.org; Wed, 30 Oct 2013 08:43:16 -0400 Original-Received: from mail-ea0-x233.google.com ([2a00:1450:4013:c01::233]:49699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbV78-0002oW-JG for emacs-devel@gnu.org; Wed, 30 Oct 2013 08:43:10 -0400 Original-Received: by mail-ea0-f179.google.com with SMTP id b10so614759eae.24 for ; Wed, 30 Oct 2013 05:43:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=date:message-id:from:to:subject:in-reply-to:references:user-agent :mime-version:content-type; bh=JYTmYU46UBgCJTCkVRNa6aB1kqD4OCVd0iJNYL+hOpc=; b=iG5f9GmYkaBMF0b4Lp0dDHvzIEJRTXac8uHniSvU7S2xpESSh59ovgXZ5wrLzZm5AV z7r+v6YoNWFmytaHNSI7SI/LuCoE4zWWR6D7yYnEvnpz8svj8r/vjuLO5a1M2Zr6l0WH UGePEFviHqdzzjcRWppBAi3+G30giYpKtmYlgGPDbvqgMAdYVzaJjsFGgxfMCq2QBP5A eAFv5GgeCCyV/0xfftb7hwFu3u7UIwnyNW8sW0MUZQhKzwc67VCxddBLW3v0uHR4/RcL 3AFmGwooxNV8nv7gWY91zZHCnNk93aCnUCxxSQ0TFNu2PGLVuBtcv6Iwqjz/qDruvF3j TGFg== X-Received: by 10.14.126.5 with SMTP id a5mr275676eei.98.1383136989772; Wed, 30 Oct 2013 05:43:09 -0700 (PDT) Original-Received: from CLAUDIO-PC.localdomain.de (178-24-125-95-dynip.superkabel.de. [178.24.125.95]) by mx.google.com with ESMTPSA id k7sm83105096eeg.13.2013.10.30.05.43.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Oct 2013 05:43:09 -0700 (PDT) In-Reply-To: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.3.50 (i686-pc-mingw32) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::233 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:164694 Archived-At: All jpeglib versions from 7 to 9 are binary incompatible with earlier ones. --- lisp/term/w32-win.el | 4 +++- src/image.c | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 9690a5a..b1e7d9b 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el @@ -221,8 +221,10 @@ See the documentation of `create-fontset-from-fontset-spec' for the format.") '(png "libpng12d.dll" "libpng12.dll" "libpng3.dll" "libpng.dll" ;; these are libpng 1.2.8 from GTK+ "libpng13d.dll" "libpng13.dll")) - '(jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll") '(tiff "libtiff3.dll" "libtiff.dll") + (if (> jpeglib-version 0) + (list 'jpeg (format "libjpeg-%d.dll" (/ jpeglib-version 10))) + '(jpeg "jpeg62.dll" "libjpeg.dll" "jpeg-62.dll" "jpeg.dll")) ;; Versions of giflib 5.0.0 and later changed signatures of ;; several functions used by Emacs, which makes those versions ;; incompatible with previous ones. We select the correct diff --git a/src/image.c b/src/image.c index 6691cfc..dea3d35 100644 --- a/src/image.c +++ b/src/image.c @@ -92,6 +92,12 @@ typedef struct w32_bitmap_record Bitmap_Record; to correctly set up the alist used to search for the respective image libraries. */ Lisp_Object Qlibpng_version, Qlibgif_version; + +/* Version of jpeglib that we were compiled with, or -1 if no JPEG + support was compiled in. This is tested by w32-win.el to correctly + set up the alist used to search for JPEG libraries. */ +Lisp_Object Qjpeglib_version; + #endif /* HAVE_NTGUI */ #ifdef HAVE_NS @@ -9411,6 +9417,14 @@ non-numeric, there is no explicit limit on the size of images. */); #else make_number (-1) #endif + ); + DEFSYM (Qjpeglib_version, "jpeglib-version"); + Fset (Qjpeglib_version, +#if HAVE_JPEG + make_number (JPEG_LIB_VERSION) +#else + make_number (-1) +#endif ); #endif -- 1.8.4.msysgit.0