aboutsummaryrefslogtreecommitdiff
path: root/pixman/pixman/pixman-compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/pixman/pixman-compiler.h')
-rw-r--r--pixman/pixman/pixman-compiler.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/pixman/pixman/pixman-compiler.h b/pixman/pixman/pixman-compiler.h
index 8f6c787f6..ebbffc3f3 100644
--- a/pixman/pixman/pixman-compiler.h
+++ b/pixman/pixman/pixman-compiler.h
@@ -89,10 +89,22 @@
# define PIXMAN_GET_THREAD_LOCAL(name) \
(&name)
-#elif defined(__MINGW32__)
+#elif defined(__MINGW32__) && !defined(__WIN64)
-# define _NO_W32_PSEUDO_MODIFIERS
-# include <windows.h>
+/* We can't include <windows.h> as it causes carious clashes with
+ * identifiers in pixman, sigh. So just declare the functions we need
+ * here.
+ */
+extern long __stdcall InterlockedCompareExchange(long volatile *, long, long);
+#define InterlockedCompareExchangePointer(d,e,c) \
+ (void *)InterlockedCompareExchange((long volatile *)(d),(long)(e),(long)(c))
+extern int __stdcall TlsAlloc (void);
+extern void * __stdcall TlsGetValue (unsigned);
+extern int __stdcall TlsSetValue (unsigned, void *);
+extern void * __stdcall CreateMutexA(void *, int, char *);
+extern int __stdcall CloseHandle(void *);
+extern unsigned __stdcall WaitForSingleObject (void *, unsigned);
+extern int __stdcall ReleaseMutex (void *);
# define PIXMAN_DEFINE_THREAD_LOCAL(type, name) \
static volatile int tls_ ## name ## _initialized = 0; \