From 605ec22ab5103e16052591517f86fe558133fb8e Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Tue, 22 Sep 2009 22:17:27 +0930 Subject: 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. --- src/cairo-mutex-impl-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairo-mutex-impl-private.h b/src/cairo-mutex-impl-private.h index 8ab7600d..4aeaa869 100644 --- a/src/cairo-mutex-impl-private.h +++ b/src/cairo-mutex-impl-private.h @@ -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 -- cgit v1.2.3