mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
* gdb.base/ending-run.c (main): Avoid messing with setvbuf; just
call `fflush' after every `printf', so that the output is produced at predictable points, regardless of whatever buffering does (or doesn't) take place. * gdb.base/ending-run.exp: Adjust tests to expect output to appear at different points.
This commit is contained in:
@@ -22,12 +22,12 @@ int main()
|
||||
int i;
|
||||
|
||||
p = (int *) malloc( 4 );
|
||||
setvbuf (stdout, alloca (64), _IOLBF, 64);
|
||||
|
||||
for (i = 1; i < 10; i++)
|
||||
{
|
||||
printf( "%d ", callee( i ));
|
||||
|
||||
fflush (stdout);
|
||||
}
|
||||
printf( " Goodbye!\n" );
|
||||
printf( " Goodbye!\n" ); fflush (stdout);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user