From a8c488d4a5583ba46eb71e28cb9f2bf603e96d4d Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Mon, 7 Oct 2002 00:17:52 +0000 Subject: [PATCH] proper patch for windows boolean issue: bug 188 --- ChangeLog | 5 +++++ libtiff/tif_jpeg.c | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index eaf7715f..533ae7a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2002-10-06 Frank Warmerdam + * libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong + size on windows. Use #define boolean hack. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=188 + * libtiff/tiff.h: Don't do special type handling in tiff.h unless USING_VISUALAGE is defined. diff --git a/libtiff/tif_jpeg.c b/libtiff/tif_jpeg.c index a83a44aa..f773d520 100644 --- a/libtiff/tif_jpeg.c +++ b/libtiff/tif_jpeg.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_jpeg.c,v 1.11 2002-07-31 21:36:08 warmerda Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_jpeg.c,v 1.12 2002-10-07 00:17:52 warmerda Exp $ */ /* * Copyright (c) 1994-1997 Sam Leffler @@ -51,9 +51,17 @@ int TIFFFillTile(TIFF*, ttile_t); #undef FAR #endif -/* The windows RPCNDR.H file defines boolean. */ -#ifdef __RPCNDR_H__ +/* + The windows RPCNDR.H file defines boolean, but defines it with the + wrong size. So we declare HAVE_BOOLEAN so that the jpeg include file + won't try to typedef boolean, but #define it to override the rpcndr.h + definition. + + http://bugzilla.remotesensing.org/show_bug.cgi?id=188 +*/ +#if defined(__RPCNDR_H__) #define HAVE_BOOLEAN +#define boolean unsigned int #endif #include "jpeglib.h"