Avoid problems with conflicting UINT16 definitions in Cygwin headers.

UINT16 is incorrectly defined inside Gdiplus namespace in w32api gdiplus.h
used by Cygwin and MinGW resulting in compilation errors about ambiguous
symbols.

Fix this by forcefully redefining UINT16 in our own code.

Closes #13113.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2011-06-17 21:53:22 +00:00
parent ff8a5f3d77
commit eeac2326b0

View File

@ -36,6 +36,14 @@
#include "wx/msw/wrapgdip.h"
// w32api headers used by both MinGW and Cygwin wrongly define UINT16 inside
// Gdiplus namespace in gdiplus.h which results in ambiguity errors when using
// this type as UINT16 is also defined in global scope by windows.h (or rather
// basetsd.h included from it), so we redefine it to work around this problem.
#if defined(__CYGWIN__) || defined(__MINGW32__)
#define UINT16 unsigned short
#endif
// ----------------------------------------------------------------------------
// helper macros
// ----------------------------------------------------------------------------