[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Revision 110444 breaks the native MS-Windows build
From: |
Eli Zaretskii |
Subject: |
Re: Revision 110444 breaks the native MS-Windows build |
Date: |
Mon, 08 Oct 2012 11:03:46 +0200 |
> Date: Mon, 08 Oct 2012 01:40:20 -0700
> From: Daniel Colascione <address@hidden>
> CC: address@hidden
>
> 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.