Fixed compiling with mingw32/64
authorSam Lantinga <slouken@libsdl.org>
Sun, 19 Sep 2010 16:46:56 -0700
changeset 4894ac19d74e2a47
parent 4893 b2e434e0553b
child 4895 fd27410a5db0
Fixed compiling with mingw32/64
configure.in
src/video/win32/SDL_msctf.h
src/video/win32/SDL_win32keyboard.c
     1.1 --- a/configure.in	Sun Sep 19 16:19:22 2010 -0400
     1.2 +++ b/configure.in	Sun Sep 19 16:46:56 2010 -0700
     1.3 @@ -2566,7 +2566,7 @@
     1.4              if test x$have_dinput = xyes; then
     1.5                  AC_DEFINE(SDL_JOYSTICK_DINPUT)
     1.6                  SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_dxjoystick.c"
     1.7 -                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8 -lole32"
     1.8 +                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -ldinput8 -ldxguid -ldxerr8"
     1.9              else
    1.10                  AC_DEFINE(SDL_JOYSTICK_WINMM)
    1.11                  SOURCES="$SOURCES $srcdir/src/joystick/win32/SDL_mmjoystick.c"
    1.12 @@ -2610,7 +2610,7 @@
    1.13          # SDL 1.3 is unicode, and unicows emulates this on Windows 98/ME
    1.14          # You can get this here: http://libunicows.sourceforge.net/
    1.15          #EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lunicows"
    1.16 -        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm"
    1.17 +        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -luser32 -lgdi32 -lmsimg32 -lwinmm -limm32 -lole32 -loleaut32 -lversion -luuid"
    1.18          # The Win32 platform requires special setup
    1.19          VERSION_SOURCES="$srcdir/src/main/win32/*.rc"
    1.20          SDLMAIN_SOURCES="$srcdir/src/main/win32/*.c"
     2.1 --- a/src/video/win32/SDL_msctf.h	Sun Sep 19 16:19:22 2010 -0400
     2.2 +++ b/src/video/win32/SDL_msctf.h	Sun Sep 19 16:46:56 2010 -0700
     2.3 @@ -1,43 +1,30 @@
     2.4  #ifndef _SDL_msctf_h
     2.5  #define _SDL_msctf_h
     2.6  
     2.7 -#define CONST_VTBL
     2.8 -#include <basetyps.h>
     2.9  #include <unknwn.h>
    2.10  
    2.11 -EXTERN_C const IID IID_ITfInputProcessorProfileActivationSink;
    2.12 -EXTERN_C const IID IID_ITfUIElementSink;
    2.13 -EXTERN_C const IID IID_ITfSource;
    2.14 -EXTERN_C const IID IID_ITfUIElementMgr;
    2.15 -EXTERN_C const IID IID_ITfReadingInformationUIElement;
    2.16 -EXTERN_C const IID IID_ITfThreadMgr;
    2.17 -EXTERN_C const IID IID_ITfThreadMgrEx;
    2.18 -
    2.19 -EXTERN_C const CLSID CLSID_TF_ThreadMgr;
    2.20 -EXTERN_C const GUID GUID_TFCAT_TIP_KEYBOARD;
    2.21 -
    2.22  #define     TF_INVALID_COOKIE               (0xffffffff)
    2.23  #define     TF_IPSINK_FLAG_ACTIVE           0x0001
    2.24  #define     TF_TMAE_UIELEMENTENABLEDONLY    0x00000004
    2.25  
    2.26 -typedef _COM_interface ITfThreadMgr ITfThreadMgr;
    2.27 -typedef _COM_interface ITfDocumentMgr ITfDocumentMgr;
    2.28 -typedef _COM_interface ITfClientId ITfClientId;
    2.29 +typedef struct ITfThreadMgr ITfThreadMgr;
    2.30 +typedef struct ITfDocumentMgr ITfDocumentMgr;
    2.31 +typedef struct ITfClientId ITfClientId;
    2.32  
    2.33 -typedef _COM_interface IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
    2.34 -typedef _COM_interface IEnumTfFunctionProviders IEnumTfFunctionProviders;
    2.35 -typedef _COM_interface ITfFunctionProvider ITfFunctionProvider;
    2.36 -typedef _COM_interface ITfCompartmentMgr ITfCompartmentMgr;
    2.37 -typedef _COM_interface ITfContext ITfContext;
    2.38 -typedef _COM_interface IEnumTfContexts IEnumTfContexts;
    2.39 -typedef _COM_interface ITfUIElementSink ITfUIElementSink;
    2.40 -typedef _COM_interface ITfUIElement ITfUIElement;
    2.41 -typedef _COM_interface ITfUIElementMgr ITfUIElementMgr;
    2.42 -typedef _COM_interface IEnumTfUIElements IEnumTfUIElements;
    2.43 -typedef _COM_interface ITfThreadMgrEx ITfThreadMgrEx;
    2.44 -typedef _COM_interface ITfReadingInformationUIElement ITfReadingInformationUIElement;
    2.45 -typedef _COM_interface ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
    2.46 -typedef _COM_interface ITfSource ITfSource;
    2.47 +typedef struct IEnumTfDocumentMgrs IEnumTfDocumentMgrs;
    2.48 +typedef struct IEnumTfFunctionProviders IEnumTfFunctionProviders;
    2.49 +typedef struct ITfFunctionProvider ITfFunctionProvider;
    2.50 +typedef struct ITfCompartmentMgr ITfCompartmentMgr;
    2.51 +typedef struct ITfContext ITfContext;
    2.52 +typedef struct IEnumTfContexts IEnumTfContexts;
    2.53 +typedef struct ITfUIElementSink ITfUIElementSink;
    2.54 +typedef struct ITfUIElement ITfUIElement;
    2.55 +typedef struct ITfUIElementMgr ITfUIElementMgr;
    2.56 +typedef struct IEnumTfUIElements IEnumTfUIElements;
    2.57 +typedef struct ITfThreadMgrEx ITfThreadMgrEx;
    2.58 +typedef struct ITfReadingInformationUIElement ITfReadingInformationUIElement;
    2.59 +typedef struct ITfInputProcessorProfileActivationSink ITfInputProcessorProfileActivationSink;
    2.60 +typedef struct ITfSource ITfSource;
    2.61  
    2.62  typedef DWORD TfClientId;
    2.63  typedef DWORD TfEditCookie;
    2.64 @@ -60,9 +47,9 @@
    2.65      HRESULT (STDMETHODCALLTYPE *GetGlobalCompartment)(ITfThreadMgr *, ITfCompartmentMgr **);
    2.66  } ITfThreadMgrVtbl;
    2.67  
    2.68 -_COM_interface ITfThreadMgr
    2.69 +struct ITfThreadMgr
    2.70  {
    2.71 -    CONST_VTBL struct ITfThreadMgrVtbl *lpVtbl;
    2.72 +    const struct ITfThreadMgrVtbl *lpVtbl;
    2.73  };
    2.74  
    2.75  typedef struct ITfThreadMgrExVtbl
    2.76 @@ -85,9 +72,9 @@
    2.77      HRESULT (STDMETHODCALLTYPE *GetActiveFlags)(ITfThreadMgrEx *, DWORD *);
    2.78  } ITfThreadMgrExVtbl;
    2.79  
    2.80 -_COM_interface ITfThreadMgrEx
    2.81 +struct ITfThreadMgrEx
    2.82  {
    2.83 -    CONST_VTBL struct ITfThreadMgrExVtbl *lpVtbl;
    2.84 +    const struct ITfThreadMgrExVtbl *lpVtbl;
    2.85  };
    2.86  
    2.87  typedef struct ITfDocumentMgrVtbl
    2.88 @@ -103,9 +90,9 @@
    2.89      HRESULT (STDMETHODCALLTYPE *EnumContexts)(ITfDocumentMgr *, IEnumTfContexts **);
    2.90  } ITfDocumentMgrVtbl;
    2.91  
    2.92 -_COM_interface ITfDocumentMgr
    2.93 +struct ITfDocumentMgr
    2.94  {
    2.95 -    CONST_VTBL struct ITfDocumentMgrVtbl *lpVtbl;
    2.96 +    const struct ITfDocumentMgrVtbl *lpVtbl;
    2.97  };
    2.98  
    2.99  typedef struct ITfUIElementSinkVtbl
   2.100 @@ -118,9 +105,9 @@
   2.101      HRESULT (STDMETHODCALLTYPE *EndUIElement)(ITfUIElementSink *, DWORD);
   2.102  } ITfUIElementSinkVtbl;
   2.103  
   2.104 -_COM_interface ITfUIElementSink
   2.105 +struct ITfUIElementSink
   2.106  {
   2.107 -    CONST_VTBL struct ITfUIElementSinkVtbl *lpVtbl;
   2.108 +    const struct ITfUIElementSinkVtbl *lpVtbl;
   2.109  };
   2.110  
   2.111  typedef struct ITfUIElementMgrVtbl
   2.112 @@ -135,9 +122,9 @@
   2.113      HRESULT (STDMETHODCALLTYPE *EnumUIElements)(ITfUIElementMgr *, IEnumTfUIElements **);
   2.114  } ITfUIElementMgrVtbl;
   2.115  
   2.116 -_COM_interface ITfUIElementMgr
   2.117 +struct ITfUIElementMgr
   2.118  {
   2.119 -    CONST_VTBL struct ITfUIElementMgrVtbl *lpVtbl;
   2.120 +    const struct ITfUIElementMgrVtbl *lpVtbl;
   2.121  };
   2.122  
   2.123  typedef struct ITfReadingInformationUIElementVtbl
   2.124 @@ -157,9 +144,9 @@
   2.125      HRESULT (STDMETHODCALLTYPE *IsVerticalOrderPreferred)(ITfReadingInformationUIElement *, BOOL *);
   2.126  } ITfReadingInformationUIElementVtbl;
   2.127  
   2.128 -_COM_interface ITfReadingInformationUIElement
   2.129 +struct ITfReadingInformationUIElement
   2.130  {
   2.131 -    CONST_VTBL struct ITfReadingInformationUIElementVtbl *lpVtbl;
   2.132 +    const struct ITfReadingInformationUIElementVtbl *lpVtbl;
   2.133  };
   2.134  
   2.135  typedef struct ITfUIElementVtbl
   2.136 @@ -173,9 +160,9 @@
   2.137      HRESULT (STDMETHODCALLTYPE *IsShown)(ITfUIElement *, BOOL *);
   2.138  } ITfUIElementVtbl;
   2.139  
   2.140 -_COM_interface ITfUIElement
   2.141 +struct ITfUIElement
   2.142  {
   2.143 -    CONST_VTBL struct ITfUIElementVtbl *lpVtbl;
   2.144 +    const struct ITfUIElementVtbl *lpVtbl;
   2.145  };
   2.146  
   2.147  typedef struct ITfInputProcessorProfileActivationSinkVtbl
   2.148 @@ -187,9 +174,9 @@
   2.149  
   2.150  } ITfInputProcessorProfileActivationSinkVtbl;
   2.151  
   2.152 -_COM_interface ITfInputProcessorProfileActivationSink
   2.153 +struct ITfInputProcessorProfileActivationSink
   2.154  {
   2.155 -    CONST_VTBL struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
   2.156 +    const struct ITfInputProcessorProfileActivationSinkVtbl *lpVtbl;
   2.157  };
   2.158  
   2.159  typedef struct ITfSourceVtbl
   2.160 @@ -201,9 +188,9 @@
   2.161      HRESULT (STDMETHODCALLTYPE *UnadviseSink)(ITfSource *, DWORD);
   2.162  } ITfSourceVtbl;
   2.163  
   2.164 -_COM_interface ITfSource
   2.165 +struct ITfSource
   2.166  {
   2.167 -    CONST_VTBL struct ITfSourceVtbl *lpVtbl;
   2.168 +    const struct ITfSourceVtbl *lpVtbl;
   2.169  };
   2.170  
   2.171  #endif /* _SDL_msctf_h */
     3.1 --- a/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 16:19:22 2010 -0400
     3.2 +++ b/src/video/win32/SDL_win32keyboard.c	Sun Sep 19 16:46:56 2010 -0700
     3.3 @@ -190,7 +190,7 @@
     3.4  
     3.5  #ifdef __GNUC__
     3.6  #undef DEFINE_GUID
     3.7 -#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}}
     3.8 +#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}}
     3.9  DEFINE_GUID(IID_ITfInputProcessorProfileActivationSink,        0x71C6E74E,0x0F28,0x11D8,0xA8,0x2A,0x00,0x06,0x5B,0x84,0x43,0x5C);
    3.10  DEFINE_GUID(IID_ITfUIElementSink,                              0xEA1EA136,0x19DF,0x11D7,0xA6,0xD2,0x00,0x06,0x5B,0x84,0x43,0x5C);
    3.11  DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD,                           0x34745C63,0xB2F0,0x4784,0x8B,0x67,0x5E,0x12,0xC8,0x70,0x1A,0x31);