aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2006-04-12 08:10:07 +0000
committerYAMAMOTO Mitsuharu2006-04-12 08:10:07 +0000
commit7f900522c43c8b297b9a756a8c9153c1317cbc40 (patch)
tree690cd22ad2c4f7ceaa1f940d22e1519cd53eb384 /src
parent5eabdcc1a2655891e947d364d43d2dd7eabe8c51 (diff)
downloademacs-7f900522c43c8b297b9a756a8c9153c1317cbc40.tar.gz
emacs-7f900522c43c8b297b9a756a8c9153c1317cbc40.zip
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'.
Diffstat (limited to 'src')
-rw-r--r--src/unexmacosx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/unexmacosx.c b/src/unexmacosx.c
index db77a83cee2..4ca0be829a2 100644
--- a/src/unexmacosx.c
+++ b/src/unexmacosx.c
@@ -100,7 +100,11 @@ Boston, MA 02110-1301, USA. */
100#if defined (__ppc__) 100#if defined (__ppc__)
101#include <mach-o/ppc/reloc.h> 101#include <mach-o/ppc/reloc.h>
102#endif 102#endif
103#if defined (HAVE_MALLOC_MALLOC_H) 103#include <config.h>
104#undef malloc
105#undef realloc
106#undef free
107#ifdef HAVE_MALLOC_MALLOC_H
104#include <malloc/malloc.h> 108#include <malloc/malloc.h>
105#else 109#else
106#include <objc/malloc.h> 110#include <objc/malloc.h>
@@ -558,7 +562,7 @@ print_load_command (struct load_command *lc)
558static void 562static void
559read_load_commands () 563read_load_commands ()
560{ 564{
561 int n, i, j; 565 int i;
562 566
563 if (!unexec_read (&mh, sizeof (struct mach_header))) 567 if (!unexec_read (&mh, sizeof (struct mach_header)))
564 unexec_error ("cannot read mach-o header"); 568 unexec_error ("cannot read mach-o header");
@@ -680,7 +684,6 @@ copy_data_segment (struct load_command *lc)
680 struct section *sectp; 684 struct section *sectp;
681 int j; 685 int j;
682 unsigned long header_offset, file_offset, old_file_offset; 686 unsigned long header_offset, file_offset, old_file_offset;
683 struct region_t *r;
684 687
685 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n", 688 printf ("Writing segment %-16.16s at %#8x - %#8x (sz: %#8x)\n",
686 scp->segname, scp->fileoff, scp->fileoff + scp->filesize, 689 scp->segname, scp->fileoff, scp->fileoff + scp->filesize,