This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Include target.h in inf-loop.h
- From: Yao Qi <qiyao at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 6 Jan 2017 14:28:11 -0000
- Subject: [binutils-gdb] Include target.h in inf-loop.h
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=051d2ddae5a2289d1f253b563e57a8e8496a06bb
commit 051d2ddae5a2289d1f253b563e57a8e8496a06bb
Author: Yao Qi <yao.qi@linaro.org>
Date: Fri Jan 6 14:26:45 2017 +0000
Include target.h in inf-loop.h
$ 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.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/inf-loop.c | 1 -
gdb/inf-loop.h | 2 ++
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c09965f..c5a6a38 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
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".
2017-01-06 Yao Qi <yao.qi@linaro.org>
diff --git a/gdb/inf-loop.c b/gdb/inf-loop.c
index 679149e..bb9fa01 100644
--- a/gdb/inf-loop.c
+++ b/gdb/inf-loop.c
@@ -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"
diff --git a/gdb/inf-loop.h b/gdb/inf-loop.h
index b76c2ee..a5d0747 100644
--- a/gdb/inf-loop.h
+++ b/gdb/inf-loop.h
@@ -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);