From: Plamen Todorov <plamen@batmbg.com>
Subject: jpeg problem for NT Emacs
Date: Mon, 15 Nov 2004 16:25:39 +0100 (Central European Standard Time) [thread overview]
Message-ID: <20041115.162539.127960243.plamen@batmbg.com> (raw)
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
reply other threads:[~2004-11-15 15:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041115.162539.127960243.plamen@batmbg.com \
--to=plamen@batmbg.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).