提交 8723d50f 编写于 作者: M Mark VanderVoord

Turn UNITY_OUTPUT_FLUSH off by default. Added a quick-define for the most...

Turn UNITY_OUTPUT_FLUSH off by default. Added a quick-define for the most common case: UNITY_USE_FLUSH_STDOUT. Clarified documentation. Fixes issue #269
上级 c67a4ffc
此差异由.gitattributes 抑制。
...@@ -252,14 +252,19 @@ extern void UNITY_OUTPUT_CHAR(int); ...@@ -252,14 +252,19 @@ extern void UNITY_OUTPUT_CHAR(int);
#endif #endif
#ifndef UNITY_OUTPUT_FLUSH #ifndef UNITY_OUTPUT_FLUSH
/* Default to using fflush, which is defined in stdio.h */ #ifdef UNITY_USE_FLUSH_STDOUT
/* We want to use the stdout flush utility */
#include <stdio.h> #include <stdio.h>
#define UNITY_OUTPUT_FLUSH (void)fflush(stdout) #define UNITY_OUTPUT_FLUSH (void)fflush(stdout)
#else #else
/* If defined as something else, make sure we declare it here so it's ready for use */ /* We've specified nothing, therefore flush should just be ignored */
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION #define UNITY_OUTPUT_FLUSH
#endif
#else
/* We've defined flush as something else, so make sure we declare it here so it's ready for use */
#ifndef UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
extern void UNITY_OUTPUT_FLUSH(void); extern void UNITY_OUTPUT_FLUSH(void);
#endif #endif
#endif #endif
#ifndef UNITY_OUTPUT_FLUSH #ifndef UNITY_OUTPUT_FLUSH
......
...@@ -55,8 +55,6 @@ compiler: ...@@ -55,8 +55,6 @@ compiler:
- UNITY_INCLUDE_DOUBLE - UNITY_INCLUDE_DOUBLE
- UNITY_SUPPORT_TEST_CASES - UNITY_SUPPORT_TEST_CASES
- UNITY_SUPPORT_64 - UNITY_SUPPORT_64
- UNITY_OUTPUT_FLUSH
- UNITY_OMIT_OUTPUT_FLUSH_HEADER_DECLARATION
object_files: object_files:
prefix: '-o' prefix: '-o'
extension: '.o' extension: '.o'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册