summaryrefslogtreecommitdiff
path: root/gdb/i386-gnu-nat.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2016-12-05 11:59:03 +0100
committerThomas Schwinge <thomas@codesourcery.com>2016-12-08 08:29:39 +0100
commit21389b7f3451a482e14fef9bd32257c4c87f4317 (patch)
treeb192b3c783433da11a906f825aa6f8b3bc5afc35 /gdb/i386-gnu-nat.c
parent0947023d1d4b5d8803a1065d622f707010b2bcdc (diff)
Hurd, C++: Mach/Hurd headers and MIG stubs are not yet fit for C++
..., so handle these in "C" mode still: gdb/ * config/i386/i386gnu.mh (%_S.o %_U.o): Add "-x c" to "COMPILE.post". * gnu-nat.c: #include Mach/Hurd headers before all others. Wrap Mach/Hurd headers and MIG stubs' prototypes in 'extern "C"'. * i386-gnu-nat.c: Likewise.
Diffstat (limited to 'gdb/i386-gnu-nat.c')
-rw-r--r--gdb/i386-gnu-nat.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gdb/i386-gnu-nat.c b/gdb/i386-gnu-nat.c
index add0aa4171..77081b8d6f 100644
--- a/gdb/i386-gnu-nat.c
+++ b/gdb/i386-gnu-nat.c
@@ -17,17 +17,21 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* Mach/Hurd headers are not yet ready for C++ compilation. */
+extern "C"
+{
+#include <mach.h>
+#include <mach_error.h>
+#include <mach/message.h>
+#include <mach/exception.h>
+}
+
#include "defs.h"
#include "x86-nat.h"
#include "inferior.h"
#include "floatformat.h"
#include "regcache.h"
-#include <mach.h>
-#include <mach_error.h>
-#include <mach/message.h>
-#include <mach/exception.h>
-
#include "i386-tdep.h"
#include "gnu-nat.h"