mirror of
https://github.com/ThrowTheSwitch/Unity.git
synced 2025-08-06 13:50:49 +08:00
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
This commit is contained in:
Binary file not shown.
@ -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:
|
|||||||
- 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'
|
||||||
|
Reference in New Issue
Block a user