Mercurial > hg > xemacs-beta
diff src/unexalpha.c @ 412:697ef44129c6 r21-2-14
Import from CVS: tag r21-2-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:20:41 +0200 |
parents | de805c49cfc1 |
children |
line wrap: on
line diff
--- a/src/unexalpha.c Mon Aug 13 11:19:22 2007 +0200 +++ b/src/unexalpha.c Mon Aug 13 11:20:41 2007 +0200 @@ -31,7 +31,6 @@ #include <sys/stat.h> #include <sys/mman.h> #include <stdio.h> -#include <errno.h> #include <varargs.h> #include <filehdr.h> #include <aouthdr.h> @@ -55,6 +54,11 @@ if (lseek (_fd, _position, L_SET) != _position) \ fatal_unexec (_error_message, _error_arg); +extern int errno; +extern char *strerror (); + +void *sbrk(); + #define EEOF -1 static struct scnhdr *text_section; @@ -81,13 +85,12 @@ }; + /* Define name of label for entry point for the dumped executable. */ #ifndef DEFAULT_ENTRY_ADDRESS #define DEFAULT_ENTRY_ADDRESS __start #endif -EXTERN_C int DEFAULT_ENTRY_ADDRESS (void); - int unexec (char *new_name, char *a_name, @@ -207,6 +210,7 @@ nhdr.aout.bsize = 0; if (entry_address == 0) { + extern int DEFAULT_ENTRY_ADDRESS (void); nhdr.aout.entry = (unsigned long)DEFAULT_ENTRY_ADDRESS; } else