[Julian, you might like to check these changes]

Fixed demangler bug -- it was relying on glibc for some functions.  This
triggered an incredibly obscure bug in my experimental skin -- memcpy() was
called within the demangler at (about?) the same time as the dynamic linker was
fiddling with the memcpy() entry, which caused one word of memory (probably
some counter in the dynamic linker) to be incremented, which my skin didn't
like.

So I removed all (AFAICT) of the demangler's dependencies on glibc.  This
required adding macros for memset, memcpy, strlen, strcmp..., to replace them
with their VG_(...) version.  The only #includes now are to .h files that are
part of Valgrind.

Also required #defining "size_t" as "Int".

Also required adding VG_(memcmp)() to vg_mylibc.c.

Also removed the "-1 == EOF" part of the compile-time test in safe-ctype.h
that checks the character set is ASCII.  This was to remove the dependency
on stdio.h.  Slightly dodgy, but should be ok I think/hope.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1436 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/vg_skin.h b/include/vg_skin.h
index 2220e52..1ff3f80 100644
--- a/include/vg_skin.h
+++ b/include/vg_skin.h
@@ -365,6 +365,7 @@
 extern Char* VG_(strdup)         ( const Char* s);
 extern void* VG_(memcpy)         ( void *d, const void *s, Int sz );
 extern void* VG_(memset)         ( void *s, Int c, Int sz );
+extern Int   VG_(memcmp)         ( const void* s1, const void* s2, Int n );
 
 /* Like strcmp() and strncmp(), but stop comparing at any whitespace. */
 extern Int   VG_(strcmp_ws)      ( const Char* s1, const Char* s2 );