* src/nolimips.cc,
* src/misc/readline.hh:
Include missing standard headers.
* src/shell/shell.cc: Change the inclusion order of some headers,
to work around incompatibilities between C and C++ headers.
Suggested by Yann Grandmaitre <yanngrandmaitre(a)gmail.com>om>.
---
ChangeLog | 11 +++++++++++
src/misc/readline.hh | 5 ++++-
src/nolimips.cc | 5 ++++-
src/shell/shell.cc | 13 +++++++++----
4 files changed, 28 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 62081f2..629165d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-10 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Fix inclusions of standard headers.
+
+ * src/nolimips.cc,
+ * src/misc/readline.hh:
+ Include missing standard headers.
+ * src/shell/shell.cc: Change the inclusion order of some headers,
+ to work around incompatibilities between C and C++ headers.
+ Suggested by Yann Grandmaitre <yanngrandmaitre(a)gmail.com>om>.
+
2008-12-06 Roland Levillain <roland(a)lrde.epita.fr>
Update bison++.
diff --git a/src/misc/readline.hh b/src/misc/readline.hh
index 9533344..19b56ec 100644
--- a/src/misc/readline.hh
+++ b/src/misc/readline.hh
@@ -1,6 +1,6 @@
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
-// Copyright (C) 2004 Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2004, 2009 Benoit Perrot <benoit(a)lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -19,6 +19,9 @@
#include "config.h"
+#include <cstdlib>
+#include <cstdio>
+
#ifdef HAVE_READLINE_READLINE_H
# include <readline/readline.h>
// #ifdef HAVE_READLINE_HISTORY_H
diff --git a/src/nolimips.cc b/src/nolimips.cc
index 285af4c..2d71d70 100644
--- a/src/nolimips.cc
+++ b/src/nolimips.cc
@@ -1,6 +1,6 @@
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
-// Copyright (C) 2003, 2004 Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2003, 2004, 2009 Benoit Perrot <benoit(a)lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -16,6 +16,9 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
+
+#include <cstdlib>
+
#include <string>
#include <iostream>
diff --git a/src/shell/shell.cc b/src/shell/shell.cc
index bb3461b..3347b2a 100644
--- a/src/shell/shell.cc
+++ b/src/shell/shell.cc
@@ -1,6 +1,6 @@
//
// This file is part of Nolimips, a MIPS simulator with unlimited registers
-// Copyright (C) 2003, 2004, 2006 Benoit Perrot <benoit(a)lrde.epita.fr>
+// Copyright (C) 2003, 2004, 2006, 2009 Benoit Perrot <benoit(a)lrde.epita.fr>
//
// Nolimips is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -17,12 +17,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-#include <iomanip>
-
+#include "misc/readline.hh"
#include "parse-tasks.hh"
#include "misc/lexutils.hh"
-#include "misc/readline.hh"
#include "parse/libparse.hh"
@@ -32,6 +30,13 @@
#include "shell/shell.hh"
#include "shell/cmd.hh"
+/* This standard is included _after_ local headers on purpose, to
+ circumvent incompatibilities between C and C++ headers regarding
+ the C macro / C++ function `isxdigit' (since g++ 4.3). See e.g.
+
http://gcc.gnu.org/ml/libstdc++/2003-01/msg00209.html for more
+ information. */
+#include <iomanip>
+
namespace shell
{
--
1.6.5