Browse Source

Workarounds for mingw compatibility.

tags/2021-05-28
jules 14 years ago
parent
commit
6f5bb01513
4 changed files with 14 additions and 6 deletions
  1. +3
    -3
      modules/juce_core/native/juce_win32_ComSmartPtr.h
  2. +3
    -3
      modules/juce_core/native/juce_win32_SystemStats.cpp
  3. +4
    -0
      modules/juce_core/network/juce_Socket.cpp
  4. +4
    -0
      modules/juce_gui_basics/juce_gui_basics.cpp

+ 3
- 3
modules/juce_core/native/juce_win32_ComSmartPtr.h 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


+ 3
- 3
modules/juce_core/native/juce_win32_SystemStats.cpp 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;


+ 4
- 0
modules/juce_core/network/juce_Socket.cpp 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)


+ 4
- 0
modules/juce_gui_basics/juce_gui_basics.cpp 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>


Loading…
Cancel
Save