# HG changeset patch # User YAMAMOTO Mitsuharu # Date 1144829407 0 # Node ID de28ca2dd3c306066fb5f75b4fbcdb5e5776e2bb # Parent e8a7cef5ffb57670191df3bf0ab05fdb25d1cf62 Include config.h before using HAVE_MALLOC_MALLOC_H. (malloc, realloc, free): Add undefs. (read_load_commands): Remove unused variable `n' and `j'. (copy_data_segment): Remove unused variable `r'. diff -r e8a7cef5ffb5 -r de28ca2dd3c3 src/unexmacosx.c --- a/src/unexmacosx.c Wed Apr 12 08:09:44 2006 +0000 +++ b/src/unexmacosx.c Wed Apr 12 08:10:07 2006 +0000 @@ -100,7 +100,11 @@ #if defined (__ppc__) #include #endif -#if defined (HAVE_MALLOC_MALLOC_H) +#include +#undef malloc +#undef realloc +#undef free +#ifdef HAVE_MALLOC_MALLOC_H #include #else #include @@ -558,7 +562,7 @@ static void read_load_commands () { - int n, i, j; + int i; if (!unexec_read (&mh, sizeof (struct mach_header))) unexec_error ("cannot read mach-o header"); @@ -680,7 +684,6 @@ struct section *sectp; int j; unsigned long header_offset, file_offset, old_file_offset; - struct region_t *r; printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n", scp->segname, scp->fileoff, scp->fileoff + scp->filesize,