From: Julian Seward Date: Mon, 27 Oct 2008 09:54:14 +0000 (+0000) Subject: Fix #includes in some more libiberty files that seem to have been X-Git-Tag: svn/VALGRIND_3_4_0~180 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc2a1bf7dc03d8e7e71fb167719af5e04e18aef2;p=thirdparty%2Fvalgrind.git Fix #includes in some more libiberty files that seem to have been forgotten about in r8710. This should _really_ make the revised demangler independent of any system installed libiberty. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8714 --- diff --git a/coregrind/m_demangle/dyn-string.c b/coregrind/m_demangle/dyn-string.c index 0836971d59..70449dd03c 100644 --- a/coregrind/m_demangle/dyn-string.c +++ b/coregrind/m_demangle/dyn-string.c @@ -28,25 +28,34 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -///////////////////////////// -#include -#include -///////////////////////////// +#if 0 /* in valgrind */ #ifdef HAVE_CONFIG_H #include "config.h" #endif +#endif /* ! in valgrind */ +#if 0 /* in valgrind */ #include +#endif /* ! in valgrind */ +#if 0 /* in valgrind */ #ifdef HAVE_STRING_H #include #endif +#endif /* ! in valgrind */ +#if 0 /* in valgrind */ #ifdef HAVE_STDLIB_H #include #endif +#endif /* ! in valgrind */ +#if 0 /* in valgrind */ #include "libiberty.h" +#endif /* ! in valgrind */ + +#include "vg_libciface.h" + #include "dyn-string.h" /* Performs in-place initialization of a dyn_string struct. This diff --git a/coregrind/m_demangle/safe-ctype.c b/coregrind/m_demangle/safe-ctype.c index 0972b4b354..7ac1c7a843 100644 --- a/coregrind/m_demangle/safe-ctype.c +++ b/coregrind/m_demangle/safe-ctype.c @@ -115,9 +115,15 @@ sets of characters: */ +#if 0 /* in valgrind */ #include "ansidecl.h" #include #include /* for EOF */ +#endif /* ! in valgrind */ + +#include "vg_libciface.h" + +#include "safe-ctype.h" #if EOF != -1 #error " requires EOF == -1" diff --git a/coregrind/m_demangle/vg_libciface.h b/coregrind/m_demangle/vg_libciface.h index 61156c9d16..a4bb10591e 100644 --- a/coregrind/m_demangle/vg_libciface.h +++ b/coregrind/m_demangle/vg_libciface.h @@ -74,6 +74,11 @@ #define xstrdup(_str) \ VG_(arena_strdup)(VG_AR_DEMANGLE,"m_demangle.xstrdup",(_str)) +/* Required by safe-ctype.h */ + +#undef EOF +#define EOF -1 + /* Taken from libiberty.h: */ #define ARRAY_SIZE(_arr) \