|
From: <sv...@va...> - 2009-01-21 03:32:30
|
Author: njn
Date: 2009-01-21 03:32:09 +0000 (Wed, 21 Jan 2009)
New Revision: 9006
Log:
Make it compile again on Mac.
Modified:
branches/DARWIN/coregrind/m_ume/macho.c
branches/DARWIN/coregrind/m_ume/priv_ume.h
Modified: branches/DARWIN/coregrind/m_ume/macho.c
===================================================================
--- branches/DARWIN/coregrind/m_ume/macho.c 2009-01-21 03:03:07 UTC (rev 9005)
+++ branches/DARWIN/coregrind/m_ume/macho.c 2009-01-21 03:32:09 UTC (rev 9006)
@@ -35,8 +35,9 @@
#include "pub_core_debuglog.h"
#include "pub_core_libcassert.h" // VG_(exit), vg_assert
#include "pub_core_libcbase.h" // VG_(memcmp), etc
+#include "pub_core_libcfile.h" // VG_(open) et al
#include "pub_core_libcprint.h"
-#include "pub_core_libcfile.h" // VG_(open) et al
+#include "pub_core_libcproc.h"
#include "pub_core_machine.h" // VG_ELF_CLASS (XXX: which should be moved)
#include "pub_core_mallocfree.h" // VG_(malloc), VG_(free)
#include "pub_core_syscall.h" // VG_(strerror)
@@ -717,7 +718,7 @@
}
-Bool VG_(match_macho)(char *hdr, Int len)
+Bool VG_(match_macho)(Char *hdr, Int len)
{
vki_uint32_t *magic = (vki_uint32_t *)hdr;
Modified: branches/DARWIN/coregrind/m_ume/priv_ume.h
===================================================================
--- branches/DARWIN/coregrind/m_ume/priv_ume.h 2009-01-21 03:03:07 UTC (rev 9005)
+++ branches/DARWIN/coregrind/m_ume/priv_ume.h 2009-01-21 03:32:09 UTC (rev 9006)
@@ -37,6 +37,10 @@
#elif defined(VGO_aix5)
// The AIX port doesn't use UME.
+#elif defined(VGO_darwin)
+# define HAVE_MACHO
+# define HAVE_SCRIPT
+
#else
#error unknown architecture
#endif
@@ -53,6 +57,11 @@
extern Int VG_(load_script) ( Int fd, const HChar *name, ExeInfo *info );
#endif
+#if defined(HAVE_MACHO)
+extern Bool VG_(match_macho) ( Char *hdr, Int len );
+extern Int VG_(load_macho) ( Int fd, const HChar *name, ExeInfo *info );
+#endif
+
#endif /* __PRIV_UME_H */
/*--------------------------------------------------------------------*/
|