From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Colascione <dancol@dancol.org>
Cc: emacs-devel@gnu.org
Subject: Re: Revision 110444 breaks the native MS-Windows build
Date: Mon, 08 Oct 2012 11:03:46 +0200 [thread overview]
Message-ID: <83wqz149ot.fsf@gnu.org> (raw)
In-Reply-To: <50729174.6070103@dancol.org>
> Date: Mon, 08 Oct 2012 01:40:20 -0700
> From: Daniel Colascione <dancol@dancol.org>
> 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 <jpeglib.h>
#include <jerror.h>
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 <windows.h>
/* 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.
next prev parent reply other threads:[~2012-10-08 9:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 8:38 Revision 110444 breaks the native MS-Windows build Eli Zaretskii
2012-10-08 8:40 ` Daniel Colascione
2012-10-08 9:03 ` Eli Zaretskii [this message]
2012-10-08 9:20 ` Eli Zaretskii
2012-10-08 10:20 ` Daniel Colascione
2012-10-08 11:56 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wqz149ot.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.