1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-18 00:54:19 +00:00

Workarounds for mingw compatibility.

This commit is contained in:
jules 2011-11-02 11:49:34 +00:00
parent 34840062ef
commit 6f5bb01513
4 changed files with 14 additions and 6 deletions

View file

@ -63,7 +63,7 @@ public:
HRESULT CoCreateInstance (REFCLSID classUUID, DWORD dwClsContext = CLSCTX_INPROC_SERVER)
{
#ifndef __MINGW32__
#if ! JUCE_MINGW
return ::CoCreateInstance (classUUID, 0, dwClsContext, __uuidof (ComClass), (void**) resetAndGetPointerAddress());
#else
jassertfalse; // need to find a mingw equivalent of __uuidof to make this possible
@ -83,7 +83,7 @@ public:
template <class OtherComClass>
HRESULT QueryInterface (ComSmartPtr<OtherComClass>& destObject) const
{
#ifndef __MINGW32__
#if ! JUCE_MINGW
return this->QueryInterface (__uuidof (OtherComClass), destObject);
#else
jassertfalse; // need to find a mingw equivalent of __uuidof to make this possible
@ -114,7 +114,7 @@ public:
JUCE_COMRESULT QueryInterface (REFIID refId, void** result)
{
#ifndef __MINGW32__
#if ! JUCE_MINGW
if (refId == __uuidof (ComClass)) { AddRef(); *result = dynamic_cast <ComClass*> (this); return S_OK; }
#endif

View file

@ -64,9 +64,9 @@ static void juce_getCpuVendor (char* const v)
{
int vendor[4] = { 0 };
#ifndef __MINGW32__
#if ! JUCE_MINGW
__try
#endif
#endif
{
#if JUCE_GCC
unsigned int dummy = 0;
@ -82,7 +82,7 @@ static void juce_getCpuVendor (char* const v)
}
#endif
}
#ifndef __MINGW32__
#if ! JUCE_MINGW
__except (EXCEPTION_EXECUTE_HANDLER)
{
*v = 0;

View file

@ -27,6 +27,10 @@
#include <winsock2.h>
#include <ws2tcpip.h>
#if JUCE_MINGW
#include <wspiapi.h>
#endif
#if JUCE_MSVC
#pragma warning (push)
#pragma warning (disable : 4127 4389 4018)

View file

@ -84,6 +84,10 @@
#pragma comment (lib, "D2d1.lib")
#endif
#if JUCE_MINGW
#include <Imm.h>
#endif
//==============================================================================
#elif JUCE_LINUX
#include <X11/Xlib.h>