summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2012-11-09 12:19:31 -0600
committerJon TURNEY <jon.turney@dronecode.org.uk>2012-11-28 14:44:14 +0000
commit338bec30054bb5d41cb6fdb5d37439f3c8124cad (patch)
treec9da020355b36dfd9821f4ff09a87698dd3aea07
parentfb170498abc746a850864b59db2ddcba7ee29215 (diff)
hw/xwin: Fix for MinGW-w64 DirectDraw headers
mingw-w64 headers handle NONAMELESSUNION earlier than mingw.org's, so it must be defined before including any headers. It also provides a ddraw.h, so use it. Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xwin/ddraw.h4
-rw-r--r--hw/xwin/win.h2
-rw-r--r--hw/xwin/winms.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/hw/xwin/ddraw.h b/hw/xwin/ddraw.h
index 9463049c8..1871d9551 100644
--- a/hw/xwin/ddraw.h
+++ b/hw/xwin/ddraw.h
@@ -1,3 +1,7 @@
+#ifdef __MINGW64_VERSION_MAJOR
+#include_next <ddraw.h>
+#define __XWIN_DDRAW_H
+#endif
#ifndef __XWIN_DDRAW_H
#define __XWIN_DDRAW_H
diff --git a/hw/xwin/win.h b/hw/xwin/win.h
index 7b34e84d9..6c524f909 100644
--- a/hw/xwin/win.h
+++ b/hw/xwin/win.h
@@ -133,6 +133,8 @@
#define WIN_MAX_KEYS_PER_KEY 4
+#define NONAMELESSUNION
+
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
diff --git a/hw/xwin/winms.h b/hw/xwin/winms.h
index 5282fc982..32923e503 100644
--- a/hw/xwin/winms.h
+++ b/hw/xwin/winms.h
@@ -30,7 +30,6 @@
* Authors: Harold L Hunt II
*/
-#define NONAMELESSUNION
#define DIRECTDRAW_VERSION 0x0300
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN