changeset 4894:ac19d74e2a47

Fixed compiling with mingw32/64
author Sam Lantinga <slouken@libsdl.org>
date Sun, 19 Sep 2010 16:46:56 -0700
parents b2e434e0553b
children fd27410a5db0
files configure.in src/video/win32/SDL_msctf.h src/video/win32/SDL_win32keyboard.c
diffstat 3 files changed, 38 insertions(+), 51 deletions(-) [+]
line wrap: on
line diff
--- a/configure.in	Sun Sep 19 16:19:22 2010 -0400
+++ b/configure.in	Sun Sep 19 16:46:56 2010 -0700
@@ -2566,7 +2566,7 @@
             if test x$have_dinput = xyes; then
                 AC_DEFINE(SDL_JOYSTICK_DINPUT)
                 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
-                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8 -lole32"
+                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
             else
                 AC_DEFINE(SDL_JOYSTICK_WINMM)
                 SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
@@ -2610,7 +2610,7 @@
         # SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME
         # You can get this here: http://libunicows.sourceforge.net/
         #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
         # The Win32 platform requires special setup
         VERSION_SOURCES="$srcdir/src/main/win32/*.rc"
         SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
--- a/src/video/win32/SDL_msctf.h	Sun Sep 19 16:19:22 2010 -0400
+++ b/src/video/win32/SDL_msctf.h	Sun Sep 19 16:46:56 2010 -0700
@@ -1,43 +1,30 @@
 #ifndef _SDL_msctf_h
 #define _SDL_msctf_h
 
-#define CONST_VTBL
-#include <basetyps.h>
 #include <unknwn.h>
 
-EXTERN_C const IID IID_ITfInputProcessorProfileActivationSink;
-EXTERN_C const IID IID_ITfUIElementSink;
-EXTERN_C const IID IID_ITfSource;
-EXTERN_C const IID IID_ITfUIElementMgr;
-EXTERN_C const IID IID_ITfReadingInformationUIElement;
-EXTERN_C const IID IID_ITfThreadMgr;
-EXTERN_C const IID IID_ITfThreadMgrEx;
-
-EXTERN_C const CLSID CLSID_TF_ThreadMgr;
-EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;
-
 #define     TF_INVALID_COOKIE               (0xffffffff)
 #define     TF_IPSINK_FLAG_ACTIVE           0x0001
 #define     TF_TMAE_UIELEMENTENABLEDONLY    0x00000004
 
-typedef _COM_interface ITfThreadMgr ITfThreadMgr;
-typedef _COM_interface ITfDocumentMgr ITfDocumentMgr;
-typedef _COM_interface ITfClientId ITfClientId;
+typedef struct ITfThreadMgr ITfThreadMgr;
+typedef struct ITfDocumentMgr ITfDocumentMgr;
+typedef struct ITfClientId ITfClientId;
 
-typedef _COM_interface IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
-typedef _COM_interface IEnumTfFunctionProviders IEnumTfFunctionProviders;
-typedef _COM_interface ITfFunctionProvider ITfFunctionProvider;
-typedef _COM_interface ITfCompartmentMgr ITfCompartmentMgr;
-typedef _COM_interface ITfContext ITfContext;
-typedef _COM_interface IEnumTfContexts IEnumTfContexts;
-typedef _COM_interface ITfUIElementSink ITfUIElementSink;
-typedef _COM_interface ITfUIElement ITfUIElement;
-typedef _COM_interface ITfUIElementMgr ITfUIElementMgr;
-typedef _COM_interface IEnumTfUIElements IEnumTfUIElements;
-typedef _COM_interface ITfThreadMgrEx ITfThreadMgrEx;
-typedef _COM_interface ITfReadingInformationUIElement ITfReadingInformationUIElement;
-typedef _COM_interface ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
-typedef _COM_interface ITfSource ITfSource;
+typedef struct IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
+typedef struct IEnumTfFunctionProviders IEnumTfFunctionProviders;
+typedef struct ITfFunctionProvider ITfFunctionProvider;
+typedef struct ITfCompartmentMgr ITfCompartmentMgr;
+typedef struct ITfContext ITfContext;
+typedef struct IEnumTfContexts IEnumTfContexts;
+typedef struct ITfUIElementSink ITfUIElementSink;
+typedef struct ITfUIElement ITfUIElement;
+typedef struct ITfUIElementMgr ITfUIElementMgr;
+typedef struct IEnumTfUIElements IEnumTfUIElements;
+typedef struct ITfThreadMgrEx ITfThreadMgrEx;
+typedef struct ITfReadingInformationUIElement ITfReadingInformationUIElement;
+typedef struct ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
+typedef struct ITfSource ITfSource;
 
 typedef DWORD TfClientId;
 typedef DWORD TfEditCookie;
@@ -60,9 +47,9 @@
     HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **);
 } ITfThreadMgrVtbl;
 
-_COM_interface ITfThreadMgr
+struct ITfThreadMgr
 {
-    CONST_VTBL struct ITfThreadMgrVtbl *lpVtbl;
+    const struct ITfThreadMgrVtbl *lpVtbl;
 };
 
 typedef struct ITfThreadMgrExVtbl
@@ -85,9 +72,9 @@
     HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *);
 } ITfThreadMgrExVtbl;
 
-_COM_interface ITfThreadMgrEx
+struct ITfThreadMgrEx
 {
-    CONST_VTBL struct ITfThreadMgrExVtbl *lpVtbl;
+    const struct ITfThreadMgrExVtbl *lpVtbl;
 };
 
 typedef struct ITfDocumentMgrVtbl
@@ -103,9 +90,9 @@
     HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **);
 } ITfDocumentMgrVtbl;
 
-_COM_interface ITfDocumentMgr
+struct ITfDocumentMgr
 {
-    CONST_VTBL struct ITfDocumentMgrVtbl *lpVtbl;
+    const struct ITfDocumentMgrVtbl *lpVtbl;
 };
 
 typedef struct ITfUIElementSinkVtbl
@@ -118,9 +105,9 @@
     HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD);
 } ITfUIElementSinkVtbl;
 
-_COM_interface ITfUIElementSink
+struct ITfUIElementSink
 {
-    CONST_VTBL struct ITfUIElementSinkVtbl *lpVtbl;
+    const struct ITfUIElementSinkVtbl *lpVtbl;
 };
 
 typedef struct ITfUIElementMgrVtbl
@@ -135,9 +122,9 @@
     HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **);
 } ITfUIElementMgrVtbl;
 
-_COM_interface ITfUIElementMgr
+struct ITfUIElementMgr
 {
-    CONST_VTBL struct ITfUIElementMgrVtbl *lpVtbl;
+    const struct ITfUIElementMgrVtbl *lpVtbl;
 };
 
 typedef struct ITfReadingInformationUIElementVtbl
@@ -157,9 +144,9 @@
     HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *);
 } ITfReadingInformationUIElementVtbl;
 
-_COM_interface ITfReadingInformationUIElement
+struct ITfReadingInformationUIElement
 {
-    CONST_VTBL struct ITfReadingInformationUIElementVtbl *lpVtbl;
+    const struct ITfReadingInformationUIElementVtbl *lpVtbl;
 };
 
 typedef struct ITfUIElementVtbl
@@ -173,9 +160,9 @@
     HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *);
 } ITfUIElementVtbl;
 
-_COM_interface ITfUIElement
+struct ITfUIElement
 {
-    CONST_VTBL struct ITfUIElementVtbl *lpVtbl;
+    const struct ITfUIElementVtbl *lpVtbl;
 };
 
 typedef struct ITfInputProcessorProfileActivationSinkVtbl
@@ -187,9 +174,9 @@
 
 } ITfInputProcessorProfileActivationSinkVtbl;
 
-_COM_interface ITfInputProcessorProfileActivationSink
+struct ITfInputProcessorProfileActivationSink
 {
-    CONST_VTBL struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
+    const struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
 };
 
 typedef struct ITfSourceVtbl
@@ -201,9 +188,9 @@
     HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD);
 } ITfSourceVtbl;
 
-_COM_interface ITfSource
+struct ITfSource
 {
-    CONST_VTBL struct ITfSourceVtbl *lpVtbl;
+    const struct ITfSourceVtbl *lpVtbl;
 };
 
 #endif /* _SDL_msctf_h */
--- a/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 16:19:22 2010 -0400
+++ b/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 16:46:56 2010 -0700
@@ -190,7 +190,7 @@
 
 #ifdef __GNUC__
 #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) static const GUID n = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
 DEFINE_GUID(IID_ITfInputProcessorProfileActivationSink,        0x71C6E74E,0x0F28,0x11D8,0xA8,0x2A,0x00,0x06,0x5B,0x84,0x43,0x5C);
 DEFINE_GUID(IID_ITfUIElementSink,                              0xEA1EA136,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C);
 DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD,                           0x34745C63,0xB2F0,0x4784,0x8B,0x67,0x5E,0x12,0xC8,0x70,0x1A,0x31);