diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-01-15 21:50:28 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-01-15 21:50:28 +0000 |
commit | c64e4ed48285a0c944905bc02de89c20038f428b (patch) | |
tree | 7804e08b98cb9e6b9ac4de5e010c6fb70f9a011b /c/src/tests/support/include/tmacros.h | |
parent | changes remerged after lost in disk crash -- recovered from snapshot, partial... (diff) | |
download | rtems-c64e4ed48285a0c944905bc02de89c20038f428b.tar.bz2 |
updates from Tony Bennett for PA and UNIX ports
Diffstat (limited to '')
-rw-r--r-- | c/src/tests/support/include/tmacros.h | 17 |
1 files changed, 11 insertions, 6 deletions
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 <rtems.h> -#include <bsp.h> +#include <bsp.h> /* includes <rtems.h> */ #include <stdio.h> #include <stdlib.h> @@ -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 ) |