Fixed all MinGW problems (except libraries not added to build yet).
authorDaniel Wyatt <Daniel.Wyatt@gmail.com>
Sun, 19 Sep 2010 16:19:22 -0400
changeset 4893b2e434e0553b
parent 4892 9e1f6d3fb870
child 4894 ac19d74e2a47
Fixed all MinGW problems (except libraries not added to build yet).
Added SDL_msctf.h for MinGW.
Added a few casts to fix warnings on MinGW.
src/video/win32/SDL_msctf.h
src/video/win32/SDL_win32keyboard.c
src/video/win32/SDL_win32video.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/video/win32/SDL_msctf.h	Sun Sep 19 16:19:22 2010 -0400
     1.3 @@ -0,0 +1,209 @@
     1.4 +#ifndef _SDL_msctf_h
     1.5 +#define _SDL_msctf_h
     1.6 +
     1.7 +#define CONST_VTBL
     1.8 +#include <basetyps.h>
     1.9 +#include <unknwn.h>
    1.10 +
    1.11 +EXTERN_C const IID IID_ITfInputProcessorProfileActivationSink;
    1.12 +EXTERN_C const IID IID_ITfUIElementSink;
    1.13 +EXTERN_C const IID IID_ITfSource;
    1.14 +EXTERN_C const IID IID_ITfUIElementMgr;
    1.15 +EXTERN_C const IID IID_ITfReadingInformationUIElement;
    1.16 +EXTERN_C const IID IID_ITfThreadMgr;
    1.17 +EXTERN_C const IID IID_ITfThreadMgrEx;
    1.18 +
    1.19 +EXTERN_C const CLSID CLSID_TF_ThreadMgr;
    1.20 +EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;
    1.21 +
    1.22 +#define     TF_INVALID_COOKIE               (0xffffffff)
    1.23 +#define     TF_IPSINK_FLAG_ACTIVE           0x0001
    1.24 +#define     TF_TMAE_UIELEMENTENABLEDONLY    0x00000004
    1.25 +
    1.26 +typedef _COM_interface ITfThreadMgr ITfThreadMgr;
    1.27 +typedef _COM_interface ITfDocumentMgr ITfDocumentMgr;
    1.28 +typedef _COM_interface ITfClientId ITfClientId;
    1.29 +
    1.30 +typedef _COM_interface IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
    1.31 +typedef _COM_interface IEnumTfFunctionProviders IEnumTfFunctionProviders;
    1.32 +typedef _COM_interface ITfFunctionProvider ITfFunctionProvider;
    1.33 +typedef _COM_interface ITfCompartmentMgr ITfCompartmentMgr;
    1.34 +typedef _COM_interface ITfContext ITfContext;
    1.35 +typedef _COM_interface IEnumTfContexts IEnumTfContexts;
    1.36 +typedef _COM_interface ITfUIElementSink ITfUIElementSink;
    1.37 +typedef _COM_interface ITfUIElement ITfUIElement;
    1.38 +typedef _COM_interface ITfUIElementMgr ITfUIElementMgr;
    1.39 +typedef _COM_interface IEnumTfUIElements IEnumTfUIElements;
    1.40 +typedef _COM_interface ITfThreadMgrEx ITfThreadMgrEx;
    1.41 +typedef _COM_interface ITfReadingInformationUIElement ITfReadingInformationUIElement;
    1.42 +typedef _COM_interface ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
    1.43 +typedef _COM_interface ITfSource ITfSource;
    1.44 +
    1.45 +typedef DWORD TfClientId;
    1.46 +typedef DWORD TfEditCookie;
    1.47 +
    1.48 +typedef struct ITfThreadMgrVtbl
    1.49 +{
    1.50 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgr *, REFIID, void **);
    1.51 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgr *);
    1.52 +    ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgr *);
    1.53 +    HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgr *, TfClientId *);
    1.54 +    HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgr *);
    1.55 +    HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgr *);
    1.56 +    HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgr *, IEnumTfDocumentMgrs **);
    1.57 +    HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgr *, ITfDocumentMgr **);
    1.58 +    HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgr *, ITfDocumentMgr *);
    1.59 +    HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgr *, HWND, ITfDocumentMgr *, ITfDocumentMgr **);
    1.60 +    HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgr *, BOOL *);
    1.61 +    HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgr *, REFCLSID, ITfFunctionProvider **);
    1.62 +    HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgr *, IEnumTfFunctionProviders **);
    1.63 +    HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **);
    1.64 +} ITfThreadMgrVtbl;
    1.65 +
    1.66 +_COM_interface ITfThreadMgr
    1.67 +{
    1.68 +    CONST_VTBL struct ITfThreadMgrVtbl *lpVtbl;
    1.69 +};
    1.70 +
    1.71 +typedef struct ITfThreadMgrExVtbl
    1.72 +{
    1.73 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfThreadMgrEx *, REFIID, void **);
    1.74 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfThreadMgrEx *);
    1.75 +    ULONG (STDMETHODCALLTYPE *Release)(ITfThreadMgrEx *);
    1.76 +    HRESULT (STDMETHODCALLTYPE *Activate)(ITfThreadMgrEx *, TfClientId *);
    1.77 +    HRESULT (STDMETHODCALLTYPE *Deactivate)(ITfThreadMgrEx *);
    1.78 +    HRESULT (STDMETHODCALLTYPE *CreateDocumentMgr)(ITfThreadMgrEx *, ITfDocumentMgr **);
    1.79 +    HRESULT (STDMETHODCALLTYPE *EnumDocumentMgrs)(ITfThreadMgrEx *, IEnumTfDocumentMgrs **);
    1.80 +    HRESULT (STDMETHODCALLTYPE *GetFocus)(ITfThreadMgrEx *, ITfDocumentMgr **);
    1.81 +    HRESULT (STDMETHODCALLTYPE *SetFocus)(ITfThreadMgrEx *, ITfDocumentMgr *);
    1.82 +    HRESULT (STDMETHODCALLTYPE *AssociateFocus)(ITfThreadMgrEx *, ITfDocumentMgr *, ITfDocumentMgr **);
    1.83 +    HRESULT (STDMETHODCALLTYPE *IsThreadFocus)(ITfThreadMgrEx *, BOOL *);
    1.84 +    HRESULT (STDMETHODCALLTYPE *GetFunctionProvider)(ITfThreadMgrEx *, REFCLSID, ITfFunctionProvider **);
    1.85 +    HRESULT (STDMETHODCALLTYPE *EnumFunctionProviders)(ITfThreadMgrEx *, IEnumTfFunctionProviders **);
    1.86 +    HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgrEx *, ITfCompartmentMgr **);
    1.87 +    HRESULT (STDMETHODCALLTYPE *ActivateEx)(ITfThreadMgrEx *, TfClientId *, DWORD);
    1.88 +    HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *);
    1.89 +} ITfThreadMgrExVtbl;
    1.90 +
    1.91 +_COM_interface ITfThreadMgrEx
    1.92 +{
    1.93 +    CONST_VTBL struct ITfThreadMgrExVtbl *lpVtbl;
    1.94 +};
    1.95 +
    1.96 +typedef struct ITfDocumentMgrVtbl
    1.97 +{
    1.98 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfDocumentMgr *, REFIID, void **);
    1.99 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfDocumentMgr *);
   1.100 +    ULONG (STDMETHODCALLTYPE *Release)(ITfDocumentMgr *);
   1.101 +    HRESULT (STDMETHODCALLTYPE *CreateContext)(ITfDocumentMgr *, TfClientId, DWORD, IUnknown *, ITfContext **, TfEditCookie *);
   1.102 +    HRESULT (STDMETHODCALLTYPE *Push)(ITfDocumentMgr *, ITfContext *);
   1.103 +    HRESULT (STDMETHODCALLTYPE *Pop)(ITfDocumentMgr *);
   1.104 +    HRESULT (STDMETHODCALLTYPE *GetTop)(ITfDocumentMgr *, ITfContext **);
   1.105 +    HRESULT (STDMETHODCALLTYPE *GetBase)(ITfDocumentMgr *, ITfContext **);
   1.106 +    HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **);
   1.107 +} ITfDocumentMgrVtbl;
   1.108 +
   1.109 +_COM_interface ITfDocumentMgr
   1.110 +{
   1.111 +    CONST_VTBL struct ITfDocumentMgrVtbl *lpVtbl;
   1.112 +};
   1.113 +
   1.114 +typedef struct ITfUIElementSinkVtbl
   1.115 +{
   1.116 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementSink *, REFIID, void **);
   1.117 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementSink *);
   1.118 +    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementSink *);
   1.119 +    HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementSink *, DWORD, BOOL *);
   1.120 +    HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementSink *, DWORD);
   1.121 +    HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD);
   1.122 +} ITfUIElementSinkVtbl;
   1.123 +
   1.124 +_COM_interface ITfUIElementSink
   1.125 +{
   1.126 +    CONST_VTBL struct ITfUIElementSinkVtbl *lpVtbl;
   1.127 +};
   1.128 +
   1.129 +typedef struct ITfUIElementMgrVtbl
   1.130 +{
   1.131 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElementMgr *, REFIID, void **);
   1.132 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElementMgr *);
   1.133 +    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElementMgr *);
   1.134 +    HRESULT (STDMETHODCALLTYPE *BeginUIElement)(ITfUIElementMgr *, ITfUIElement *, BOOL *, DWORD *);
   1.135 +    HRESULT (STDMETHODCALLTYPE *UpdateUIElement)(ITfUIElementMgr *, DWORD);
   1.136 +    HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementMgr *, DWORD);
   1.137 +    HRESULT (STDMETHODCALLTYPE *GetUIElement)(ITfUIElementMgr *, DWORD, ITfUIElement **);
   1.138 +    HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **);
   1.139 +} ITfUIElementMgrVtbl;
   1.140 +
   1.141 +_COM_interface ITfUIElementMgr
   1.142 +{
   1.143 +    CONST_VTBL struct ITfUIElementMgrVtbl *lpVtbl;
   1.144 +};
   1.145 +
   1.146 +typedef struct ITfReadingInformationUIElementVtbl
   1.147 +{
   1.148 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfReadingInformationUIElement *, REFIID, void **);
   1.149 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfReadingInformationUIElement *);
   1.150 +    ULONG (STDMETHODCALLTYPE *Release)(ITfReadingInformationUIElement *);
   1.151 +    HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfReadingInformationUIElement *, BSTR *);
   1.152 +    HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfReadingInformationUIElement *, GUID *);
   1.153 +    HRESULT (STDMETHODCALLTYPE *Show)(ITfReadingInformationUIElement *, BOOL);
   1.154 +    HRESULT (STDMETHODCALLTYPE *IsShown)(ITfReadingInformationUIElement *, BOOL *);
   1.155 +    HRESULT (STDMETHODCALLTYPE *GetUpdatedFlags)(ITfReadingInformationUIElement *, DWORD *);
   1.156 +    HRESULT (STDMETHODCALLTYPE *GetContext)(ITfReadingInformationUIElement *, ITfContext **);
   1.157 +    HRESULT (STDMETHODCALLTYPE *GetString)(ITfReadingInformationUIElement *, BSTR *);
   1.158 +    HRESULT (STDMETHODCALLTYPE *GetMaxReadingStringLength)(ITfReadingInformationUIElement *, UINT *);
   1.159 +    HRESULT (STDMETHODCALLTYPE *GetErrorIndex)(ITfReadingInformationUIElement *, UINT *);
   1.160 +    HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *);
   1.161 +} ITfReadingInformationUIElementVtbl;
   1.162 +
   1.163 +_COM_interface ITfReadingInformationUIElement
   1.164 +{
   1.165 +    CONST_VTBL struct ITfReadingInformationUIElementVtbl *lpVtbl;
   1.166 +};
   1.167 +
   1.168 +typedef struct ITfUIElementVtbl
   1.169 +{
   1.170 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfUIElement *, REFIID, void **);
   1.171 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfUIElement *);
   1.172 +    ULONG (STDMETHODCALLTYPE *Release)(ITfUIElement *);
   1.173 +    HRESULT (STDMETHODCALLTYPE *GetDescription)(ITfUIElement *, BSTR *);
   1.174 +    HRESULT (STDMETHODCALLTYPE *GetGUID)(ITfUIElement *, GUID *);
   1.175 +    HRESULT (STDMETHODCALLTYPE *Show)(ITfUIElement *, BOOL);
   1.176 +    HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *);
   1.177 +} ITfUIElementVtbl;
   1.178 +
   1.179 +_COM_interface ITfUIElement
   1.180 +{
   1.181 +    CONST_VTBL struct ITfUIElementVtbl *lpVtbl;
   1.182 +};
   1.183 +
   1.184 +typedef struct ITfInputProcessorProfileActivationSinkVtbl
   1.185 +{
   1.186 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfInputProcessorProfileActivationSink *, REFIID, void **);
   1.187 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfInputProcessorProfileActivationSink *);
   1.188 +    ULONG (STDMETHODCALLTYPE *Release)(ITfInputProcessorProfileActivationSink *);
   1.189 +    HRESULT (STDMETHODCALLTYPE *OnActivated)(ITfInputProcessorProfileActivationSink *, DWORD, LANGID, REFCLSID, REFGUID, REFGUID, HKL, DWORD);
   1.190 +
   1.191 +} ITfInputProcessorProfileActivationSinkVtbl;
   1.192 +
   1.193 +_COM_interface ITfInputProcessorProfileActivationSink
   1.194 +{
   1.195 +    CONST_VTBL struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
   1.196 +};
   1.197 +
   1.198 +typedef struct ITfSourceVtbl
   1.199 +{
   1.200 +    HRESULT (STDMETHODCALLTYPE *QueryInterface)(ITfSource *, REFIID, void **);
   1.201 +    ULONG (STDMETHODCALLTYPE *AddRef)(ITfSource *);
   1.202 +    ULONG (STDMETHODCALLTYPE *Release)(ITfSource *);
   1.203 +    HRESULT (STDMETHODCALLTYPE *AdviseSink)(ITfSource *, REFIID, IUnknown *, DWORD *);
   1.204 +    HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD);
   1.205 +} ITfSourceVtbl;
   1.206 +
   1.207 +_COM_interface ITfSource
   1.208 +{
   1.209 +    CONST_VTBL struct ITfSourceVtbl *lpVtbl;
   1.210 +};
   1.211 +
   1.212 +#endif /* _SDL_msctf_h */
     2.1 --- a/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 14:41:18 2010 -0400
     2.2 +++ b/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 16:19:22 2010 -0400
     2.3 @@ -188,6 +188,20 @@
     2.4  
     2.5  }
     2.6  
     2.7 +#ifdef __GNUC__
     2.8 +#undef DEFINE_GUID
     2.9 +#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}}
    2.10 +DEFINE_GUID(IID_ITfInputProcessorProfileActivationSink,        0x71C6E74E,0x0F28,0x11D8,0xA8,0x2A,0x00,0x06,0x5B,0x84,0x43,0x5C);
    2.11 +DEFINE_GUID(IID_ITfUIElementSink,                              0xEA1EA136,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C);
    2.12 +DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD,                           0x34745C63,0xB2F0,0x4784,0x8B,0x67,0x5E,0x12,0xC8,0x70,0x1A,0x31);
    2.13 +DEFINE_GUID(IID_ITfSource,                                     0x4EA48A35,0x60AE,0x446F,0x8F,0xD6,0xE6,0xA8,0xD8,0x24,0x59,0xF7);
    2.14 +DEFINE_GUID(IID_ITfUIElementMgr,                               0xEA1EA135,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C);
    2.15 +DEFINE_GUID(IID_ITfReadingInformationUIElement,                0xEA1EA139,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C);
    2.16 +DEFINE_GUID(IID_ITfThreadMgr,                                  0xAA80E801,0x2021,0x11D2,0x93,0xE0,0x00,0x60,0xB0,0x67,0xB8,0x6E);
    2.17 +DEFINE_GUID(CLSID_TF_ThreadMgr,                                0x529A9E6B,0x6587,0x4F23,0xAB,0x9E,0x9C,0x7D,0x68,0x3E,0x3C,0x50);
    2.18 +DEFINE_GUID(IID_ITfThreadMgrEx,                                0x3E90ADE3,0x7594,0x4CB0,0xBB,0x58,0x69,0x62,0x8F,0x5F,0x45,0x8C);
    2.19 +#endif
    2.20 +
    2.21  #define LANG_CHT MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL)
    2.22  #define LANG_CHS MAKELANGID(LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED)
    2.23  
    2.24 @@ -246,7 +260,7 @@
    2.25      videodata->ime_hwnd_main = hwnd;
    2.26      if (SUCCEEDED(CoInitializeEx(NULL, COINIT_APARTMENTTHREADED))) {
    2.27          videodata->ime_com_initialized = SDL_TRUE;
    2.28 -        CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgr, &videodata->ime_threadmgr);
    2.29 +        CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgr, (LPVOID *)&videodata->ime_threadmgr);
    2.30      }
    2.31      videodata->ime_initialized = SDL_TRUE;
    2.32      videodata->ime_himm32 = LoadLibraryA("imm32.dll");
    2.33 @@ -301,7 +315,7 @@
    2.34  
    2.35      IME_ClearComposition(videodata);
    2.36      if (videodata->ime_hwnd_current == videodata->ime_hwnd_main)
    2.37 -        ImmAssociateContext(videodata->ime_hwnd_current, NULL);
    2.38 +        ImmAssociateContext(videodata->ime_hwnd_current, (HIMC)0);
    2.39  
    2.40      videodata->ime_enabled = SDL_FALSE;
    2.41      UILess_DisableUIUpdates(videodata);
    2.42 @@ -342,7 +356,7 @@
    2.43      WCHAR buffer[16];
    2.44      WCHAR *s = buffer;
    2.45      DWORD len = 0;
    2.46 -    DWORD err = 0;
    2.47 +    INT err = 0;
    2.48      BOOL vertical = FALSE;
    2.49      UINT maxuilen = 0;
    2.50      static OSVERSIONINFOA osversion = {0};
    2.51 @@ -949,7 +963,7 @@
    2.52      TfClientId clientid = 0;
    2.53      SDL_bool result = SDL_FALSE;
    2.54      ITfSource *source = 0;
    2.55 -    if (FAILED(CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgrEx, &videodata->ime_threadmgrex)))
    2.56 +    if (FAILED(CoCreateInstance(&CLSID_TF_ThreadMgr, NULL, CLSCTX_INPROC_SERVER, &IID_ITfThreadMgrEx, (LPVOID *)&videodata->ime_threadmgrex)))
    2.57          return SDL_FALSE;
    2.58  
    2.59      if (FAILED(videodata->ime_threadmgrex->lpVtbl->ActivateEx(videodata->ime_threadmgrex, &clientid, TF_TMAE_UIELEMENTENABLEDONLY)))
    2.60 @@ -989,7 +1003,7 @@
    2.61  UILess_ReleaseSinks(SDL_VideoData *videodata)
    2.62  {
    2.63      ITfSource *source = 0;
    2.64 -    if (videodata->ime_threadmgrex && SUCCEEDED(videodata->ime_threadmgrex->lpVtbl->QueryInterface(videodata->ime_threadmgrex, &IID_ITfSource, &source))) {
    2.65 +    if (videodata->ime_threadmgrex && SUCCEEDED(videodata->ime_threadmgrex->lpVtbl->QueryInterface(videodata->ime_threadmgrex, &IID_ITfSource, (LPVOID *)&source))) {
    2.66          source->lpVtbl->UnadviseSink(source, videodata->ime_uielemsinkcookie);
    2.67          source->lpVtbl->UnadviseSink(source, videodata->ime_alpnsinkcookie);
    2.68          SAFE_RELEASE(source);
     3.1 --- a/src/video/win32/SDL_win32video.h	Sun Sep 19 14:41:18 2010 -0400
     3.2 +++ b/src/video/win32/SDL_win32video.h	Sun Sep 19 16:19:22 2010 -0400
     3.3 @@ -36,7 +36,12 @@
     3.4  
     3.5  #include <windows.h>
     3.6  
     3.7 +#ifndef __GNUC__
     3.8  #include <msctf.h>
     3.9 +#else
    3.10 +#include "SDL_msctf.h"
    3.11 +#endif
    3.12 +
    3.13  #include <imm.h>
    3.14  
    3.15  #if SDL_VIDEO_RENDER_D3D