From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Revision 110444 breaks the native MS-Windows build Date: Mon, 08 Oct 2012 11:03:46 +0200 Message-ID: <83wqz149ot.fsf@gnu.org> References: <83y5jh4auz.fsf@gnu.org> <50729174.6070103@dancol.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1349687058 6109 80.91.229.3 (8 Oct 2012 09:04:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 8 Oct 2012 09:04:18 +0000 (UTC) Cc: emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 08 11:04:24 2012 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 1TL9GC-0005su-6Z for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2012 11:04:24 +0200 Original-Received: from localhost ([::1]:34658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL9G3-00076E-4T for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2012 05:04:15 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55369) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL9Ft-00075R-Mc for emacs-devel@gnu.org; Mon, 08 Oct 2012 05:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TL9Fj-0005CI-M6 for emacs-devel@gnu.org; Mon, 08 Oct 2012 05:04:05 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:36994) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TL9Fj-0005C0-DP for emacs-devel@gnu.org; Mon, 08 Oct 2012 05:03:55 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MBK00300H599M00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 08 Oct 2012 11:03:53 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MBK002MLH6HQ790@a-mtaout20.012.net.il>; Mon, 08 Oct 2012 11:03:53 +0200 (IST) In-reply-to: <50729174.6070103@dancol.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:154222 Archived-At: > Date: Mon, 08 Oct 2012 01:40:20 -0700 > From: Daniel Colascione > CC: emacs-devel@gnu.org > > On 10/8/2012 1:38 AM, Eli Zaretskii wrote: > > Error messages look like this: > > > > image.c:6081: error: `fn_jpeg_start_decompress' declared as function returning a function > > image.c:6082: error: `fn_jpeg_finish_decompress' declared as function returning a function > > image.c:6087: error: `fn_jpeg_resync_to_restart' declared as function returning a function > > image.c:6112: error: `jpeg_resync_to_restart_wrapper' declared as function returning a function > > image.c:6136: error: field `cinfo' has incomplete type > > image.c: In function `my_error_exit': > > image.c:6152: error: dereferencing pointer to incomplete type > > image.c: At top level: > > image.c:6185: error: `our_memory_fill_input_buffer' declared as function returning a function > > > > Crap. That's what I get for testing --without-jpeg, --without-gif, etc. I'll > find the libraries and fix the break. The problems are here: #ifdef HAVE_NTGUI /* Glue for code below */ #define fn_XpmReadFileToImage XpmReadFileToImage #define fn_XpmCreateImageFromBuffer XpmCreateImageFromBuffer #define fn_XImageFree XImageFree #define fn_XpmFreeAttributes XpmFreeAttributes #endif /* HAVE_NTGUI */ This is inappropriate for MS-Windows, so I suggest to replace #ifdef HAVE_NTGUI with #if defined (HAVE_NTGUI) && !defined (WINDOWSNT) OK? The more serious problem is here: /* Work around conflict between jpeg boolean and rpcndr.h under Windows. */ #define boolean jpeg_boolean <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< #include #include You never explained what kind of conflict did you try to solve. (I find the description of changes in image.c inadequate, most of the changes are simply left out.) If I ifdef away that marked line, everything compiles, and the resulting executable is able to display JPEG images. What I see in rpcndr.h (its MinGW variant) is this: typedef unsigned char boolean; and in jconfig.h, a jpeglib header included by jpeglib.h, I see this: #ifdef _WIN32 # include /* Define "boolean" as unsigned char, not int, per Windows custom */ # if !defined __RPCNDR_H__ || defined __MINGW32__ /* don't conflict if rpcndr.h already read */ # ifndef boolean /* don't conflict if rpcndr.h already read */ typedef unsigned char boolean; # endif /* boolean */ # endif /* __RPCNDR_H__ */ # define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ # define USE_WINDOWS_MESSAGEBOX 1 #endif /* _WIN32 */ This seems to be in perfect order, so I don't understand the conflict you were seeing. In any case, you cannot hope for the above to compile unless you also typedef jpeg_boolean.