From: ademin Date: Sat, 13 Feb 2010 14:17:56 +0000 (+0000) Subject: src: Fixed stdout and stderr problems. X-Git-Tag: cmocka-1.1.1~356 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4648ba500864d34a155fff380a43a3dae57a763;p=platform%2Fupstream%2Fcmocka.git src: Fixed stdout and stderr problems. This fixes cmockery defect #13. Signed-off-by: Andreas Schneider --- diff --git a/src/cmockery.c b/src/cmockery.c index df78ea2..e658885 100755 --- a/src/cmockery.c +++ b/src/cmockery.c @@ -1533,6 +1533,7 @@ void vprint_message(const char* const format, va_list args) { char buffer[1024]; vsnprintf(buffer, sizeof(buffer), format, args); printf(buffer); + fflush(stdout); #ifdef _WIN32 OutputDebugString(buffer); #endif // _WIN32 @@ -1543,6 +1544,7 @@ void vprint_error(const char* const format, va_list args) { char buffer[1024]; vsnprintf(buffer, sizeof(buffer), format, args); fprintf(stderr, buffer); + fflush(stderr); #ifdef _WIN32 OutputDebugString(buffer); #endif // _WIN32