diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBase.h b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBase.h index 0c8a8dff5d..7c42744e10 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBase.h +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBase.h @@ -50,6 +50,7 @@ #pragma clang diagnostic ignored "-Wdeprecated-declarations" #include +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #if TARGET_OS_MAC #include diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBuffer.h b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBuffer.h index 875ab611fb..cd0ec8a8c3 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBuffer.h +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUBuffer.h @@ -47,6 +47,8 @@ #ifndef __AUBuffer_h__ #define __AUBuffer_h__ +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" + #include #if !defined(__COREAUDIO_USE_FLAT_INCLUDES__) #include diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewBase.h b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewBase.h index 53fb353bbc..b8bd9c0303 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewBase.h +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewBase.h @@ -48,6 +48,7 @@ #define __AUCarbonViewBase_h__ #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include #include "AUCarbonViewControl.h" diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewControl.h b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewControl.h index fb5adb4b83..8aba58f215 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewControl.h +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUCarbonViewControl.h @@ -47,6 +47,7 @@ #ifndef __AUCarbonViewControl_h__ #define __AUCarbonViewControl_h__ +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include #include #include diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUOutputElement.cpp b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUOutputElement.cpp index 658facb659..b9fb999e08 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUOutputElement.cpp +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUOutputElement.cpp @@ -44,6 +44,8 @@ Copyright (C) 2014 Apple Inc. All Rights Reserved. */ + +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include "AUOutputElement.h" #include "AUBase.h" diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.cpp b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.cpp index c441dfe642..4551e17b5f 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.cpp +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/AUScopeElement.cpp @@ -44,6 +44,8 @@ Copyright (C) 2014 Apple Inc. All Rights Reserved. */ + +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include "AUScopeElement.h" #include "AUBase.h" diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.cpp b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.cpp index 481a468ce5..a48868ac75 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.cpp +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CAAUParameter.cpp @@ -44,6 +44,8 @@ Copyright (C) 2014 Apple Inc. All Rights Reserved. */ + +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include "CAAUParameter.h" CAAUParameter::CAAUParameter() diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CADebugMacros.h b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CADebugMacros.h index 28a3f5ebda..044026bb5f 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CADebugMacros.h +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CADebugMacros.h @@ -48,6 +48,8 @@ #define __CADebugMacros_h__ #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" + //============================================================================= // Includes diff --git a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CarbonEventHandler.cpp b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CarbonEventHandler.cpp index ac76327c62..dfa9e65c59 100644 --- a/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CarbonEventHandler.cpp +++ b/modules/juce_audio_plugin_client/AU/CoreAudioUtilityClasses/CarbonEventHandler.cpp @@ -44,6 +44,8 @@ Copyright (C) 2014 Apple Inc. All Rights Reserved. */ + +#include "../../../juce_core/native/juce_mac_ClangBugWorkaround.h" #include "CarbonEventHandler.h" static pascal OSStatus TheEventHandler(EventHandlerCallRef inHandlerRef, EventRef inEvent, void *inUserData) diff --git a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm index 8d4b13d6bd..ce09dfd380 100644 --- a/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm +++ b/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm @@ -27,6 +27,7 @@ #include "AppConfig.h" #include "../utility/juce_CheckSettingMacros.h" +#include "../../juce_core/native/juce_mac_ClangBugWorkaround.h" #if JucePlugin_Build_AU diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp old mode 100755 new mode 100644 index 05795e9590..96a7d8d28d --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.cpp @@ -25,8 +25,8 @@ // Your project must contain an AppConfig.h file with your project-specific settings in it, // and your header search path must make it accessible to the module's files. #include "AppConfig.h" - #include "../utility/juce_CheckSettingMacros.h" +#include "../../juce_core/native/juce_mac_ClangBugWorkaround.h" #if JucePlugin_Build_VST diff --git a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm index 267d7c0f0e..439fbd0ccd 100644 --- a/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm +++ b/modules/juce_audio_plugin_client/VST/juce_VST_Wrapper.mm @@ -27,6 +27,7 @@ #include "AppConfig.h" #include "../utility/juce_CheckSettingMacros.h" +#include "../../juce_core/native/juce_mac_ClangBugWorkaround.h" #if JucePlugin_Build_VST || JucePlugin_Build_VST3 diff --git a/modules/juce_core/native/juce_mac_ClangBugWorkaround.h b/modules/juce_core/native/juce_mac_ClangBugWorkaround.h new file mode 100644 index 0000000000..8f478e0490 --- /dev/null +++ b/modules/juce_core/native/juce_mac_ClangBugWorkaround.h @@ -0,0 +1,36 @@ +/* + ============================================================================== + + This file is part of the juce_core module of the JUCE library. + Copyright (c) 2015 - ROLI Ltd. + + Permission to use, copy, modify, and/or distribute this software for any purpose with + or without fee is hereby granted, provided that the above copyright notice and this + permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD + TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN + NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER + IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ------------------------------------------------------------------------------ + + NOTE! This permissive ISC license applies ONLY to files within the juce_core module! + All other JUCE modules are covered by a dual GPL/commercial license, so if you are + using any other modules, be sure to check that you also comply with their license. + + For more details, visit www.juce.com + + ============================================================================== +*/ + + +// This hack is a workaround for a bug (?) in Apple's 10.11 SDK headers +// which cause some configurations of Clang to throw out a spurious error.. +#if JUCE_PROJUCER_LIVE_BUILD && (defined (__APPLE_CPP__) || defined(__APPLE_CC__)) + #include + #undef CF_OPTIONS + #define CF_OPTIONS(_type, _name) _type _name; enum +#endif diff --git a/modules/juce_core/system/juce_TargetPlatform.h b/modules/juce_core/system/juce_TargetPlatform.h index 6f900ec797..3ae770d7ce 100644 --- a/modules/juce_core/system/juce_TargetPlatform.h +++ b/modules/juce_core/system/juce_TargetPlatform.h @@ -55,16 +55,10 @@ #define Point CarbonDummyPointName // (workaround to avoid definition of "Point" by old Carbon headers) #define Component CarbonDummyCompName #include // (needed to find out what platform we're using) + #include "../native/juce_mac_ClangBugWorkaround.h" #undef Point #undef Component - #if JUCE_PROJUCER_LIVE_BUILD - // This hack is a workaround for a bug (?) in Apple's 10.11 SDK headers - // which cause some configurations of Clang to throw out an error.. - #undef CF_OPTIONS - #define CF_OPTIONS(_type, _name) _type _name; enum - #endif - #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR #define JUCE_IPHONE 1 #define JUCE_IOS 1