Fix another build failure in tui-selftests.c
authorTom Tromey <tromey@adacore.com>
Wed, 4 Dec 2019 15:08:13 +0000 (08:08 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 4 Dec 2019 15:08:13 +0000 (08:08 -0700)
Christian had emailed me to say that the TUI unit test broke the mingw
build, but I erroneously thought this was fixed by the earlier patch
that made the test body conditional on the TUI being built.

However, I was wrong about this -- tui-selftests.c unconditionally
includes tui-winsource.h, which fails if curses is not available.

This patch fixes the build problem by moving this include into the
"#ifdef TUI" section.

Tested by rebuilding a mingw-hosted gdb.

gdb/ChangeLog
2019-12-04  Tom Tromey  <tromey@adacore.com>

* unittests/tui-selftests.c: Conditionally include tui-winsource.h.

Change-Id: If608649ef5cbef8ea92192e11c53379742967ee7

gdb/ChangeLog
gdb/unittests/tui-selftests.c

index f27043da0e42b9f3b628635472f9544a506dbc89..8837a23888142ed3e5e6f60efebd45b7b58f38cf 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-04  Tom Tromey  <tromey@adacore.com>
+
+       * unittests/tui-selftests.c: Conditionally include tui-winsource.h.
+
 2019-12-04  Tom Tromey  <tromey@adacore.com>
 
        * dwarf2read.c (process_structure_scope): Initialize
index 95c12e3f5d21d58e94155ca1c3ed0878805a866f..03969ea8ef6586a9e2ef9f99a8a95b0308782a8d 100644 (file)
 
 #include "defs.h"
 #include "gdbsupport/selftest.h"
-#include "tui/tui-winsource.h"
 
 #ifdef TUI
 
+#include "tui/tui-winsource.h"
+
 namespace selftests {
 namespace tui {
 
This page took 0.030143 seconds and 4 git commands to generate.