Skip to content

Commit

Permalink
Prevent jmorecfg.h from re-defining INT32 and INT16 if those types ha…
Browse files Browse the repository at this point in the history
…ve already been defined by the Windows system headers.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@664 632fc199-4ca6-4c93-a231-07263d6284db
  • Loading branch information
dcommander committed Jun 21, 2011
2 parents cf137ac + ffdb8f2 commit b7120ca
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ v7 or v8 emulation or arithmetic coding support was enabled. Note that to
achieve full ABI compatibility with jpeg-6b, it is necessary to build
libjpeg-turbo without arithmetic coding support.

[3] Fixed an issue whereby Windows applications that used libjpeg-turbo would
fail to compile if the Windows system headers were included before jpeglib.h.
This issue was caused by a conflict in the definition of the INT32 type.


1.1.1
=====
Expand Down
7 changes: 7 additions & 0 deletions win/jconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ typedef unsigned char boolean;
#endif
#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */

/* Define "INT32" as int, not long, per Windows custom */
#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
typedef short INT16;
typedef signed int INT32;
#endif
#define XMD_H /* prevent jmorecfg.h from redefining it */

#define inline __inline

#ifdef JPEG_INTERNALS
Expand Down

0 comments on commit b7120ca

Please sign in to comment.