summaryrefslogtreecommitdiff
path: root/src/unexalpha.c
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2000-06-19 16:19:05 +0000
committerDave Love <fx@gnu.org>2000-06-19 16:19:05 +0000
commit20fd0b4fab6f7a7f3f669b75eee8a8fa2c75d8bc (patch)
tree1cc77627c9814e9d643c791b8eeb46ae3e05ce08 /src/unexalpha.c
parent3a8e2ba917c2afafeea9ada5e3e8b12d3fe01a49 (diff)
downloademacs-20fd0b4fab6f7a7f3f669b75eee8a8fa2c75d8bc.tar.gz
Include errno.h, string.h, unistd.h. Don't declare errno, strerror.
Put text after #endif in comment.
Diffstat (limited to 'src/unexalpha.c')
-rw-r--r--src/unexalpha.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/unexalpha.c b/src/unexalpha.c
index 987828664eb..de6c46a8358 100644
--- a/src/unexalpha.c
+++ b/src/unexalpha.c
@@ -1,6 +1,6 @@
/* Unexec for DEC alpha. schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf).
- Copyright (C) 1994 Free Software Foundation, Inc.
+ Copyright (C) 1994, 2000 Free Software Foundation, Inc.
This file is part of GNU Emacs.
@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */
#include <sys/mman.h>
#include <stdio.h>
#include <varargs.h>
+#include <errno.h>
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
#if !defined (__NetBSD__) && !defined (__OpenBSD__)
#include <filehdr.h>
#include <aouthdr.h>
@@ -94,10 +98,11 @@ static void mark_x ();
if (lseek (_fd, _position, L_SET) != _position) \
fatal_unexec (_error_message, _error_arg);
-extern int errno;
-extern char *strerror ();
-
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#else
void *sbrk ();
+#endif
#define EEOF -1
@@ -235,10 +240,10 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
#endif
#ifdef _PDATA
CHECK_SCNHDR (pdata_section, _PDATA, STYP_PDATA);
-#endif _PDATA
+#endif /* _PDATA */
#ifdef _GOT
CHECK_SCNHDR (got_section, _GOT, STYP_GOT);
-#endif _GOT
+#endif /* _GOT */
CHECK_SCNHDR (data_section, _DATA, STYP_DATA);
#ifdef _XDATA
CHECK_SCNHDR (xdata_section, _XDATA, STYP_XDATA);