mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
Check the size of the boolean type used by an external jpeg lib on Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2788,6 +2788,30 @@ if test "$wxUSE_LIBJPEG" != "no" ; then
|
||||
else
|
||||
dnl we are using the system library
|
||||
wxUSE_LIBJPEG=sys
|
||||
|
||||
if test "$wxUSE_MSW" = 1; then
|
||||
dnl boolean is defined by the jpeg headers and also by the
|
||||
dnl Windows headers of some compilers. This type has been
|
||||
dnl renamed in the builtin, so it is only an issue when
|
||||
dnl using an external jpeg lib on Windows.
|
||||
AC_CHECK_TYPES(
|
||||
[boolean],
|
||||
[
|
||||
AC_CHECK_SIZEOF(
|
||||
[boolean],
|
||||
[],
|
||||
[
|
||||
#undef HAVE_BOOLEAN
|
||||
#include <stdio.h>
|
||||
#include <jpeglib.h>
|
||||
])
|
||||
AC_DEFINE_UNQUOTED(
|
||||
[wxHACK_BOOLEAN],
|
||||
[wxInt`expr 8 \* $ac_cv_sizeof_boolean`])
|
||||
],
|
||||
[],
|
||||
[#include <windows.h>])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1161,6 +1161,10 @@
|
||||
*/
|
||||
#define wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW 1
|
||||
|
||||
/* When using an external jpeg library and the Windows headers already define
|
||||
* boolean, define to the type used by the jpeg library for boolean. */
|
||||
#undef wxHACK_BOOLEAN
|
||||
|
||||
/* Define if the header pbt.h is missing. */
|
||||
#undef NEED_PBT_H
|
||||
|
||||
|
||||
@@ -32,14 +32,9 @@
|
||||
// This hack is only necessary for an external jpeg library, the builtin one
|
||||
// usually used on Windows doesn't use the type boolean, so always works.
|
||||
//
|
||||
#if defined wxHACK_BOOLEAN || defined __RPCNDR_H__ || defined __WINE_RPCNDR_H
|
||||
#ifdef wxHACK_BOOLEAN
|
||||
#define HAVE_BOOLEAN
|
||||
|
||||
#ifdef wxHACK_BOOLEAN
|
||||
#define boolean wxHACK_BOOLEAN
|
||||
#else
|
||||
#define boolean int
|
||||
#endif
|
||||
#define boolean wxHACK_BOOLEAN
|
||||
#endif
|
||||
|
||||
extern "C"
|
||||
|
||||
+4
-7
@@ -59,14 +59,11 @@ int TIFFFillTile(TIFF*, ttile_t);
|
||||
|
||||
http://bugzilla.remotesensing.org/show_bug.cgi?id=188
|
||||
*/
|
||||
#if defined wxHACK_BOOLEAN || defined __RPCNDR_H__ || defined __WINE_RPCNDR_H
|
||||
#ifdef wxHACK_BOOLEAN
|
||||
#include "wx/defs.h"
|
||||
#define XMD_H
|
||||
#define HAVE_BOOLEAN
|
||||
|
||||
#ifdef wxHACK_BOOLEAN
|
||||
#define boolean wxHACK_BOOLEAN
|
||||
#else
|
||||
#define boolean int
|
||||
#endif
|
||||
#define boolean wxHACK_BOOLEAN
|
||||
#endif
|
||||
|
||||
#include "jpeglib.h"
|
||||
|
||||
Reference in New Issue
Block a user