Fix cygwin compile error

The WINVER macros need to be defined before including <windows.h>.
As a result of some recent include file rearranging, <windows.h>
was included indirectly before WINVER was defined.
This commit is contained in:
Adrian Johnson 2007-04-29 19:29:24 +09:30 committed by Carl Worth
parent a5d1fc923f
commit 4be608399f
2 changed files with 6 additions and 17 deletions

View file

@ -80,18 +80,6 @@ CAIRO_BEGIN_DECLS
#elif HAVE_WINDOWS_H /*******************************************************/
/* We require Windows 2000 features. Although we don't use them here, things
* should still work if this header file ends up being the one to include
* windows.h into a source file, so: */
# if !defined(WINVER) || (WINVER < 0x0500)
# define WINVER 0x0500
# endif
# if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
# define _WIN32_WINNT 0x0500
# endif
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
typedef CRITICAL_SECTION cairo_mutex_t;

View file

@ -36,11 +36,6 @@
* Vladimir Vukicevic <vladimir@pobox.com>
*/
#include "cairoint.h"
#include "cairo-clip-private.h"
#include "cairo-win32-private.h"
#define WIN32_LEAN_AND_MEAN
/* We require Windows 2000 features such as ETO_PDY */
#if !defined(WINVER) || (WINVER < 0x0500)
@ -49,6 +44,12 @@
#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0500)
# define _WIN32_WINNT 0x0500
#endif
#include "cairoint.h"
#include "cairo-clip-private.h"
#include "cairo-win32-private.h"
#include <windows.h>
#if defined(__MINGW32__) && !defined(ETO_PDY)