From c64e4ed48285a0c944905bc02de89c20038f428b Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 15 Jan 1996 21:50:28 +0000 Subject: updates from Tony Bennett for PA and UNIX ports --- c/src/tests/support/include/tmacros.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'c/src/tests/support/include') diff --git a/c/src/tests/support/include/tmacros.h b/c/src/tests/support/include/tmacros.h index dc2a82f397..affc132edd 100644 --- a/c/src/tests/support/include/tmacros.h +++ b/c/src/tests/support/include/tmacros.h @@ -21,8 +21,7 @@ extern "C" { #endif -#include -#include +#include /* includes */ #include #include @@ -40,23 +39,29 @@ extern "C" { fatal_directive_status( dirstat, RTEMS_SUCCESSFUL, failmsg ) #define fatal_directive_status( stat, desired, msg ) \ - { \ + do { \ if ( (stat) != (desired) ) { \ printf( "\n%s FAILED -- expected (%d) got (%d)\n", \ (msg), (desired), (stat) ); \ + fflush(stdout); \ exit( stat ); \ } \ - } + } while ( 0 ) #define sprint_time(str,s1,tb,s2) \ + do { \ sprintf( (str), "%s%02d:%02d:%02d %02d/%02d/%04d%s", \ s1, (tb)->hour, (tb)->minute, (tb)->second, \ - (tb)->month, (tb)->day, (tb)->year, s2 ); + (tb)->month, (tb)->day, (tb)->year, s2 ); \ + } while ( 0 ) #define print_time(s1,tb,s2) \ + do { \ printf( "%s%02d:%02d:%02d %02d/%02d/%04d%s", \ s1, (tb)->hour, (tb)->minute, (tb)->second, \ - (tb)->month, (tb)->day, (tb)->year, s2 ); + (tb)->month, (tb)->day, (tb)->year, s2 ); \ + fflush(stdout); \ + } while ( 0 ) #define put_dot( c ) putchar( c ); fflush( stdout ) -- cgit v1.2.3