From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Plamen Todorov Newsgroups: gmane.emacs.devel Subject: jpeg problem for NT Emacs Date: Mon, 15 Nov 2004 16:25:39 +0100 (Central European Standard Time) Message-ID: <20041115.162539.127960243.plamen@batmbg.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1100528946 8562 80.91.229.6 (15 Nov 2004 14:29:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 Nov 2004 14:29:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 15 15:29:00 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CThqm-0005JA-00 for ; Mon, 15 Nov 2004 15:29:00 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CThzR-0007Dq-Vr for ged-emacs-devel@m.gmane.org; Mon, 15 Nov 2004 09:37:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CThzJ-0007Dc-FW for emacs-devel@gnu.org; Mon, 15 Nov 2004 09:37:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CThzI-0007DI-EM for emacs-devel@gnu.org; Mon, 15 Nov 2004 09:37:48 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CThzH-0007Cw-Rk for emacs-devel@gnu.org; Mon, 15 Nov 2004 09:37:47 -0500 Original-Received: from [212.91.166.210] (helo=mail.batmbg.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CThq5-0007Is-9R for emacs-devel@gnu.org; Mon, 15 Nov 2004 09:28:17 -0500 Original-Received: (qmail 27771 invoked from network); 15 Nov 2004 14:24:50 -0000 Original-Received: from unknown (HELO localhost) (192.168.0.30) by mars.batmbg.com with SMTP; 15 Nov 2004 14:24:50 -0000 Original-To: emacs-devel@gnu.org X-Mailer: Mew version 4.1 on Emacs 21.3.50 / Mule 5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29872 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29872 Hello, I had a problem compiling JPEG support for NT emacs 21.3.50. After trying to load a JPEG image I could see the following message: "JPEG parameter struct mismatch: library thinks size is 432, caller expects 464", which is reported by jdapimin.c module of the JPEG library (version 6b-3). image.c includes jpeglib.h. It includes jcontrol.h, which: #ifdef __WIN32__ #include /* Define "boolean" as unsigned char, not int, per Windows custom */ //#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ #ifndef boolean /* don't conflict if rpcndr.h already read */ typedef unsigned char boolean; #endif Then, in jmorecfg.h: #ifndef HAVE_BOOLEAN typedef int boolean; #endif Since the define __WIN32__ is not by default set for windows compilation, the JPEG related structures of image.c are compiled with typedef int boolean. Then in image.c, fn_jpeg_CreateDecompress(...) call, the sizeof(cinfo) computes different size (464) than the one jpeg62.dll expects (432). By passing -D__WIN32__ to cflags of configure.bat, everything is ok - the compiled emacs can open JPEG files. Shouldn't this #define be set by default in nmake.defs ? Plamen