]> code.delx.au - gnu-emacs/blobdiff - src/unexnext.c
(message): Use message2, not message1.
[gnu-emacs] / src / unexnext.c
index 08fe46489a36452c92184eb3fb02c92e61534c69..c402fcacc54a0e608ee0726602c72b44f806bc7f 100644 (file)
@@ -1,12 +1,12 @@
 /* Dump Emacs in macho format.
-   Copyright (C) 1990 Free Software Foundation, Inc.
+   Copyright (C) 1990, 1993 Free Software Foundation, Inc.
    Written by Bradley Taylor (btaylor@next.com).
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 1, or (at your option)
+the Free Software Foundation; either version 2, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -24,14 +24,14 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#include <mach.h>
-#include <sys/loader.h>
+#include <mach/mach.h>
+#include <mach-o/loader.h>
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <libc.h>
 
 
-extern struct section *getsectbyname(char *, char *);
+int malloc_cookie;
 
 /*
  * Kludge: we don't expect any program data beyond VM_HIGHDATA
@@ -175,7 +175,7 @@ get_data_region(
        kern_return_t ret;
        struct section *sect;
 
-       sect = getsectbyname(SEG_DATA, SECT_DATA);
+       sect = (struct section *) getsectbyname(SEG_DATA, SECT_DATA);
        region.address = 0;
        *address = 0;
        for (;;) {
@@ -258,10 +258,7 @@ unexec_doit(
        }
 
 
-       {
-         extern int malloc_cookie;
-         malloc_cookie = malloc_freezedry();
-       }
+       malloc_cookie = malloc_freezedry ();
        if (!get_data_region(&data_address, &data_size)) {
                return (0);
        }