From: DRC Date: Mon, 6 Jul 2015 16:04:04 +0000 (+0000) Subject: Add additional protections against defining INT32 if another header has already defin... X-Git-Tag: 1.4.2~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c23e36e80009728b8c0f5e36ba6cb07885334d3b;p=libjpeg-turbo Add additional protections against defining INT32 if another header has already defined it (code borrowed from libjpeg v8.) This isn't necessary when using the libjpeg-turbo build system on Windows, because the CMake generated jconfig.h defines INT32 and then defines XMD_H to trick jmorecfg.h into not redefining it. However, some projects build libjpeg-turbo using their own build systems. git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.4.x@1593 632fc199-4ca6-4c93-a231-07263d6284db --- c23e36e80009728b8c0f5e36ba6cb07885334d3b diff --cc jmorecfg.h index 108e7de,6c085c3..e86ccc6 --- a/jmorecfg.h +++ b/jmorecfg.h @@@ -1,10 -1,9 +1,11 @@@ /* * jmorecfg.h * + * This file was part of the Independent JPEG Group's software: * Copyright (C) 1991-1997, Thomas G. Lane. - * Modified 1997-2011 by Guido Vollbeding. - * This file is part of the Independent JPEG Group's software. ++ * Modified 1997-2009 by Guido Vollbeding. + * libjpeg-turbo Modifications: + * Copyright (C) 2009, 2011, 2014, D. R. Commander. * For conditions of distribution and use, see the accompanying README file. * * This file contains additional configuration options that customize the @@@ -147,9 -158,15 +148,15 @@@ typedef short INT16 /* INT32 must hold at least signed 32-bit values. */ -#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ + #ifndef _BASETSD_H_ /* Microsoft defines it in basetsd.h */ + #ifndef _BASETSD_H /* MinGW is slightly different */ + #ifndef QGLOBAL_H /* Qt defines it in qglobal.h */ typedef long INT32; #endif + #endif + #endif + #endif /* Datatype used for image dimensions. The JPEG standard only supports * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore