cvs: gd /libgd/src gd_jpeg.c

From: Date: Fri, 18 Apr 2008 09:27:03 +0000
Subject: cvs: gd /libgd/src gd_jpeg.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-461@lists.php.net to get a copy of this message
pajoye Fri Apr 18 09:27:03 2008 UTC Modified files: /gd/libgd/src gd_jpeg.c Log: - prevent types conflict under mingw http://cvs.php.net/viewvc.cgi/gd/libgd/src/gd_jpeg.c?r1=1.21&r2=1.22&diff_format=u Index: gd/libgd/src/gd_jpeg.c diff -u gd/libgd/src/gd_jpeg.c:1.21 gd/libgd/src/gd_jpeg.c:1.22 --- gd/libgd/src/gd_jpeg.c:1.21 Fri Dec 21 21:21:16 2007 +++ gd/libgd/src/gd_jpeg.c Fri Apr 18 09:27:03 2008 @@ -25,7 +25,7 @@ # include "config.h" #endif -#include <stdio.h> +//#include <stdio.h> #include <stdlib.h> #include <setjmp.h> #include <limits.h> @@ -37,6 +37,27 @@ #ifdef HAVE_LIBJPEG #include "gdhelpers.h" +/* + Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is + not defined. MinGW and Borland compilers include a typedef for INT32, + which causes a conflict. MSVC does not include a conficting typedef + given the headers which are included. + */ +#if defined(__BORLANDC__) || defined(__MINGW32__) +# define XMD_H 1 +#endif + +/* + Another possible conflict under MinGW + */ +#if defined(WIN32) && defined(__MINGW32__) +# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ + typedef unsigned char boolean; +# endif +# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ +#endif + + /* JCE undef two symbols that we don't need anymore but which are may be defined in config.h from ./configure but which are redefined incompatibly in jpeglib.h */

« previous php.gd.cvs (#461) next »