summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2012-08-21 15:31:16 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-09-05 23:49:05 +0100
commitc493cd82c5b512efad284304f19349cc84a2c63d (patch)
tree1bb41befc6098fa6c11464041b30fa9e787a3564
parent5078a0649219a370f2c3a6fe7557f525fbc06dec (diff)
Fix compilation with mingw-w64 w32api headers
- GUID_SECT was only ever needed for gcc pre-2.95 - Wrap 'Status' when including objbase.h - Include propkey.h, propsys.h rather than defining necessary stuff ourselves XXX: See if we can avoid hand-rolling the GUID defnitions and just link with -ldxguid instead Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r--hw/xwin/ddraw.h4
-rw-r--r--hw/xwin/taskbar.h10
-rw-r--r--hw/xwin/winshaddd.c2
-rw-r--r--hw/xwin/winshadddnl.c2
4 files changed, 16 insertions, 2 deletions
diff --git a/hw/xwin/ddraw.h b/hw/xwin/ddraw.h
index 9463049c8..fade7306e 100644
--- a/hw/xwin/ddraw.h
+++ b/hw/xwin/ddraw.h
@@ -3,7 +3,11 @@
#include <winnt.h>
#include <wingdi.h>
+#pragma push_macro("Status")
+#undef Status
+#define Status wStatus
#include <objbase.h>
+#pragma pop_macro("Status")
#if defined(NONAMELESSUNION) && !defined(DUMMYUNIONNAME1)
#define DUMMYUNIONNAME1 u1
diff --git a/hw/xwin/taskbar.h b/hw/xwin/taskbar.h
index e5b32e471..11cbeb3f5 100644
--- a/hw/xwin/taskbar.h
+++ b/hw/xwin/taskbar.h
@@ -31,6 +31,13 @@
#include <windows.h>
+#ifdef __MINGW64_VERSION_MAJOR
+/* If we are using headers from mingw-w64 project, it provides the PSDK headers this needs ... */
+#include <propkey.h>
+#include <propsys.h>
+#else /* !__MINGW64_VERSION_MAJOR */
+/* ... otherwise, we need to define all this stuff ourselves */
+
typedef struct _tagpropertykey {
GUID fmtid;
DWORD pid;
@@ -71,8 +78,11 @@ DEFINE_GUID(IID_IPropertyStore, 0x886d8eeb, 0x8cf2, 0x4446, 0x8d, 0x02, 0xcd,
DEFINE_PROPERTYKEY(PKEY_AppUserModel_ID, 0x9F4C2855, 0x9F79, 0x4B39, 0xA8, 0xD0,
0xE1, 0xD4, 0x2D, 0xE1, 0xD5, 0xF3, 5);
+#endif /* !__MINGW64_VERSION_MAJOR */
+
typedef HRESULT(__stdcall * SHGETPROPERTYSTOREFORWINDOWPROC) (HWND, REFIID,
void **);
typedef HRESULT(__stdcall * PROPVARIANTCLEARPROC) (PROPVARIANT *);
+
#endif
diff --git a/hw/xwin/winshaddd.c b/hw/xwin/winshaddd.c
index 4cb54b56d..68444fcda 100644
--- a/hw/xwin/winshaddd.c
+++ b/hw/xwin/winshaddd.c
@@ -42,7 +42,7 @@
*/
#ifdef DEFINE_GUID
#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif /* DEFINE_GUID */
/*
diff --git a/hw/xwin/winshadddnl.c b/hw/xwin/winshadddnl.c
index 6768c5c13..8e4658e12 100644
--- a/hw/xwin/winshadddnl.c
+++ b/hw/xwin/winshadddnl.c
@@ -42,7 +42,7 @@
*/
#ifdef DEFINE_GUID
#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
+#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
#endif /* DEFINE_GUID */
/*