diff --git a/src/core/juce_Memory.h b/src/core/juce_Memory.h index 8297c05b2a..edcf4202b9 100644 --- a/src/core/juce_Memory.h +++ b/src/core/juce_Memory.h @@ -192,6 +192,11 @@ #define juce_ThreadLocal __thread #endif +//============================================================================== +#if JUCE_MINGW + /** This allocator is not defined in mingw gcc. */ + #define alloca __builtin_alloca +#endif //============================================================================== /** Clears a block of memory. */ diff --git a/src/core/juce_TargetPlatform.h b/src/core/juce_TargetPlatform.h index 9c0205477a..c802f66a6e 100644 --- a/src/core/juce_TargetPlatform.h +++ b/src/core/juce_TargetPlatform.h @@ -70,6 +70,10 @@ #ifdef _DEBUG #define JUCE_DEBUG 1 #endif + + #ifdef __MINGW32__ + #define JUCE_MINGW 1 + #endif /** If defined, this indicates that the processor is little-endian. */ #define JUCE_LITTLE_ENDIAN 1 diff --git a/src/gui/components/juce_Desktop.cpp b/src/gui/components/juce_Desktop.cpp index ce4f620d00..4251e70a89 100644 --- a/src/gui/components/juce_Desktop.cpp +++ b/src/gui/components/juce_Desktop.cpp @@ -33,7 +33,7 @@ BEGIN_JUCE_NAMESPACE #include "../graphics/geometry/juce_RectangleList.h" extern void juce_updateMultiMonitorInfo (Array & monitorCoords, - const bool clipToWorkArea) throw(); + const bool clipToWorkArea); //============================================================================== diff --git a/src/gui/components/windows/juce_TopLevelWindow.cpp b/src/gui/components/windows/juce_TopLevelWindow.cpp index 64931016b0..7e1b66a90c 100644 --- a/src/gui/components/windows/juce_TopLevelWindow.cpp +++ b/src/gui/components/windows/juce_TopLevelWindow.cpp @@ -135,7 +135,7 @@ private: juce_ImplementSingleton_SingleThreaded (TopLevelWindowManager) -void juce_CheckCurrentlyFocusedTopLevelWindow() throw() +void juce_CheckCurrentlyFocusedTopLevelWindow() { if (TopLevelWindowManager::getInstanceWithoutCreating() != 0) TopLevelWindowManager::getInstanceWithoutCreating()->startTimer (20); diff --git a/src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp b/src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp index cddf977561..4b53c28cae 100644 --- a/src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp +++ b/src/gui/graphics/imaging/image_file_formats/juce_JPEGLoader.cpp @@ -32,6 +32,9 @@ namespace jpeglibNamespace { #if JUCE_INCLUDE_JPEGLIB_CODE + #if JUCE_MINGW + typedef unsigned char boolean; + #endif extern "C" { #define JPEG_INTERNALS diff --git a/src/native/linux/juce_linux_Windowing.cpp b/src/native/linux/juce_linux_Windowing.cpp index 7e706bd9db..79a2b440d7 100644 --- a/src/native/linux/juce_linux_Windowing.cpp +++ b/src/native/linux/juce_linux_Windowing.cpp @@ -2563,7 +2563,7 @@ void juce_windowMessageReceive (XEvent* event) } //============================================================================== -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool /*clipToWorkArea*/) throw() +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool /*clipToWorkArea*/) { if (display == 0) return; diff --git a/src/native/mac/juce_iphone_MiscUtilities.mm b/src/native/mac/juce_iphone_MiscUtilities.mm index 675ededb10..9fbae5ba6b 100644 --- a/src/native/mac/juce_iphone_MiscUtilities.mm +++ b/src/native/mac/juce_iphone_MiscUtilities.mm @@ -181,7 +181,7 @@ bool Desktop::isScreenSaverEnabled() throw() //============================================================================== -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) { const ScopedAutoReleasePool pool; monitorCoords.clear(); diff --git a/src/native/mac/juce_mac_MiscUtilities.mm b/src/native/mac/juce_mac_MiscUtilities.mm index 82296bcb4d..f8efa4a819 100644 --- a/src/native/mac/juce_mac_MiscUtilities.mm +++ b/src/native/mac/juce_mac_MiscUtilities.mm @@ -239,7 +239,7 @@ bool Desktop::isScreenSaverEnabled() throw() #endif //============================================================================== -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) { const ScopedAutoReleasePool pool; monitorCoords.clear(); diff --git a/src/native/windows/juce_win32_Fonts.cpp b/src/native/windows/juce_win32_Fonts.cpp index 92ba3818ae..3652b82f5a 100644 --- a/src/native/windows/juce_win32_Fonts.cpp +++ b/src/native/windows/juce_win32_Fonts.cpp @@ -102,7 +102,7 @@ const StringArray Font::findAllTypefaceNames() throw() return results; } -extern bool juce_IsRunningInWine() throw(); +extern bool juce_IsRunningInWine(); void Font::getPlatformDefaultFontNames (String& defaultSans, String& defaultSerif, String& defaultFixed) throw() { diff --git a/src/native/windows/juce_win32_Messaging.cpp b/src/native/windows/juce_win32_Messaging.cpp index 09f56180f6..8af316e2ca 100644 --- a/src/native/windows/juce_win32_Messaging.cpp +++ b/src/native/windows/juce_win32_Messaging.cpp @@ -32,12 +32,16 @@ static const unsigned int specialId = WM_APP + 0x4400; static const unsigned int broadcastId = WM_APP + 0x4403; static const unsigned int specialCallbackId = WM_APP + 0x4402; - + static const TCHAR* const messageWindowName = _T("JUCEWindow"); HWND juce_messageWindowHandle = 0; extern long improbableWindowNumber; // defined in windowing.cpp + +#ifndef WM_APPCOMMAND + #define WM_APPCOMMAND 0x0319 +#endif //============================================================================== diff --git a/src/native/windows/juce_win32_NativeIncludes.h b/src/native/windows/juce_win32_NativeIncludes.h index eb6be77d67..edc22f23f7 100644 --- a/src/native/windows/juce_win32_NativeIncludes.h +++ b/src/native/windows/juce_win32_NativeIncludes.h @@ -65,13 +65,16 @@ #include #include #include -#include #include -#include #include #include #include +#if ! JUCE_MINGW + #include + #include +#endif + #if JUCE_OPENGL #include #endif diff --git a/src/native/windows/juce_win32_SystemStats.cpp b/src/native/windows/juce_win32_SystemStats.cpp index ff4bea5ce0..3921ff91d6 100644 --- a/src/native/windows/juce_win32_SystemStats.cpp +++ b/src/native/windows/juce_win32_SystemStats.cpp @@ -27,8 +27,7 @@ // compiled on its own). #if JUCE_INCLUDED_FILE -extern void juce_updateMultiMonitorInfo() throw(); -extern void juce_initialiseThreadEvents() throw(); +extern void juce_initialiseThreadEvents(); //============================================================================== diff --git a/src/native/windows/juce_win32_Windowing.cpp b/src/native/windows/juce_win32_Windowing.cpp index 022e22b634..93dce5c622 100644 --- a/src/native/windows/juce_win32_Windowing.cpp +++ b/src/native/windows/juce_win32_Windowing.cpp @@ -42,9 +42,9 @@ #define WM_APPCOMMAND 0x0319 #endif -extern void juce_repeatLastProcessPriority() throw(); // in juce_win32_Threads.cpp -extern void juce_CheckCurrentlyFocusedTopLevelWindow() throw(); // in juce_TopLevelWindow.cpp -extern bool juce_IsRunningInWine() throw(); +extern void juce_repeatLastProcessPriority(); // in juce_win32_Threads.cpp +extern void juce_CheckCurrentlyFocusedTopLevelWindow(); // in juce_TopLevelWindow.cpp +extern bool juce_IsRunningInWine(); #ifndef ULW_ALPHA #define ULW_ALPHA 0x00000002 @@ -2428,7 +2428,7 @@ static BOOL CALLBACK enumMonitorsProc (HMONITOR, HDC, LPRECT r, LPARAM userInfo) return TRUE; } -void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) throw() +void juce_updateMultiMonitorInfo (Array & monitorCoords, const bool clipToWorkArea) { EnumDisplayMonitors (0, 0, &enumMonitorsProc, (LPARAM) &monitorCoords);