diff --git a/.travis.yml b/.travis.yml index ca664b38092321363afebe971ed7869221a30818..d75cbd2a511552139b8aeaad9f0aee218d4d6532 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,4 +6,4 @@ script: - cd test && rake ci - make -s - cd ../extras/fixture/test && rake ci - - make -s default noStdLibMalloc + - make -s default noStdlibMalloc diff --git a/src/unity.c b/src/unity.c index b398b3f4e199bf413ce088ab279c6631e8d39780..d8df1e055fde80d177cbc376836485c57d21907d 100644 --- a/src/unity.c +++ b/src/unity.c @@ -7,6 +7,9 @@ #include "unity.h" #include +#ifdef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION +int UNITY_OUTPUT_CHAR(int); //If omitted from header, declare it here so it's ready for use +#endif #define UNITY_FAIL_AND_BAIL { Unity.CurrentTestFailed = 1; longjmp(Unity.AbortFrame, 1); } #define UNITY_IGNORE_AND_BAIL { Unity.CurrentTestIgnored = 1; longjmp(Unity.AbortFrame, 1); } /// return prematurely if we are already in failure or ignore state diff --git a/src/unity_internals.h b/src/unity_internals.h index 6549656a9443f3a4ef63cdb4cd06c558838f5c14..560d28ffef16b310cece94a4821bc3d0ac632d70 100644 --- a/src/unity_internals.h +++ b/src/unity_internals.h @@ -293,7 +293,9 @@ typedef UNITY_DOUBLE_TYPE _UD; #define UNITY_OUTPUT_CHAR(a) putchar(a) #else //If defined as something else, make sure we declare it here so it's ready for use + #ifndef UNITY_OMIT_OUTPUT_CHAR_HEADER_DECLARATION extern int UNITY_OUTPUT_CHAR(int); + #endif #endif #ifndef UNITY_PRINT_EOL