[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
jpeg problem for NT Emacs
From: |
Plamen Todorov |
Subject: |
jpeg problem for NT Emacs |
Date: |
Mon, 15 Nov 2004 16:25:39 +0100 (Central European Standard Time) |
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 <windows.h>
/* 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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- jpeg problem for NT Emacs,
Plamen Todorov <=