diff --git a/auto/generate_test_runner.rb b/auto/generate_test_runner.rb index f436634..b049bca 100644 --- a/auto/generate_test_runner.rb +++ b/auto/generate_test_runner.rb @@ -158,7 +158,9 @@ class UnityTestRunnerGenerator create_runtest(output, mocks) output.puts("\n/*=======Automagically Detected Files To Include=====*/") output.puts("#include \"#{@options[:framework]}.h\"") + output.puts('#ifdef __WIN32__') output.puts("#include \"#{@options[:framework]}_setup.h\"") + output.puts('#endif') output.puts('#include "cmock.h"') unless mocks.empty? output.puts('#include ') output.puts('#include ') diff --git a/src/unity_internals.h b/src/unity_internals.h index 1b57cd0..4761253 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -301,7 +301,7 @@ extern void UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION; * Language Features Available *-------------------------------------------------------*/ #if !defined(UNITY_WEAK_ATTRIBUTE) && !defined(UNITY_WEAK_PRAGMA) -# ifdef __GNUC__ /* includes clang */ +# if defined(__GNUC__) || defined(__ghs__) /* __GNUC__ includes clang */ # if !(defined(__WIN32__) && defined(__clang__)) && !defined(__TMS470__) # define UNITY_WEAK_ATTRIBUTE __attribute__((weak)) # endif