Use _WIN32 to check for win32 mutex

Commit 535bcaa1 moved pthread after win32 to fix mingw build
problems. However this breaks cygwin builds.

On cygwin HAVE_WINDOWS_H is defined but _WIN32 is not. This was
causing windows.h to be included which defines _WIN32. As a result the
win32 code in cairo-misc.c was being compiled but the win32 declaration
in cairint.h was not included.

Fix this by using _WIN32 to enable the win32 mutex functions since
_WIN32 is defined by mingw, visual C++, and winegcc, but not
cygwin. On cygwin, posix functions are preferred as it is a unix
emulation environment.
This commit is contained in:
Adrian Johnson 2009-09-22 22:17:27 +09:30
parent e00d062749
commit 605ec22ab5

View file

@ -168,7 +168,7 @@
# define CAIRO_MUTEX_IMPL_UNLOCK(mutex) CAIRO_MUTEX_IMPL_NOOP1(mutex)
# define CAIRO_MUTEX_IMPL_NIL_INITIALIZER 0
#elif defined(HAVE_WINDOWS_H) || defined(_MSC_VER) /*************************/
#elif defined(_WIN32) /******************************************************/
# include <windows.h>