Include target.h in inf-loop.h
authorYao Qi <yao.qi@linaro.org>
Fri, 6 Jan 2017 14:26:45 +0000 (14:26 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 6 Jan 2017 14:26:45 +0000 (14:26 +0000)
$ make check-headers CHECK_HEADERS="target.h inf-loop.h"
...
../../binutils-gdb/gdb/inf-loop.h:23:42: error: use of enum 'inferior_event_type' without previous declaration
 extern void inferior_event_handler (enum inferior_event_type event_type,
                                          ^
gdb:

2017-01-06  Yao Qi  <yao.qi@linaro.org>

* inf-loop.c: Don't include "target.h".
* inf-loop.h: Include it here.

gdb/ChangeLog
gdb/inf-loop.c
gdb/inf-loop.h

index c09965ff1e6418705e852dc194f4c4faff4cbe54..c5a6a388d73129ded6c7a08f15b2ed867cfb07b7 100644 (file)
@@ -1,3 +1,8 @@
+2017-01-06  Yao Qi  <yao.qi@linaro.org>
+
+       * inf-loop.c: Don't include "target.h".
+       * inf-loop.h: Include it here.
+
 2017-01-06  Yao Qi  <yao.qi@linaro.org>
 
        * dfp.h: Include "dboulest.h" and "expression.h".
index 679149e6ca3ae3736079c9d6da114eded2618675..bb9fa011ee29ad2a40fb808f487522a2928c3990 100644 (file)
@@ -20,7 +20,6 @@
 #include "defs.h"
 #include "inferior.h"
 #include "infrun.h"
-#include "target.h"             /* For enum inferior_event_type.  */
 #include "event-loop.h"
 #include "event-top.h"
 #include "inf-loop.h"
index b76c2eec58d5d7a103690cf3e5d4958638b546aa..a5d0747466c1e7ae46380d265d1400873a1122cc 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef INF_LOOP_H
 #define INF_LOOP_H
 
+#include "target.h"             /* For enum inferior_event_type.  */
+
 extern void inferior_event_handler (enum inferior_event_type event_type, 
                                    void* client_data);