aports/main/boost/fix-fgetc-define.patch
Mike Sullivan 9414a67dfd main/boost: fix and reenable failing debugger tests In debugger::debug_parent_wait() the variable ch was mistakenly defined to be a char and used to obtain a value from ch = fgetc( command_child );
Later in the code a compare of the truncated ch (0xff) to the constant EOF (0xffffffff) would fail resulting in errors between the expected and actual values returned in the debugger.py and debugger-mi.py tests.

Since fgetc is defined to return an int the declaration of ch was modified and the truncation eliminated.

I will post the patch to the boost/build community as well.
2018-08-16 10:08:37 +00:00

12 lines
357 B
Diff

--- a/tools/build/src/engine/debugger.c
+++ b/tools/build/src/engine/debugger.c
@@ -978,7 +983,7 @@
/* Waits for events from the child. */
static void debug_parent_wait( int print_message )
{
- char ch = fgetc( command_child );
+ int ch = fgetc( command_child );
if ( ch == DEBUG_MSG_BREAKPOINT )
{
debug_parent_on_breakpoint();