Commit 20fd0b4f authored by Dave Love's avatar Dave Love
Browse files

Include errno.h, string.h, unistd.h. Don't declare errno, strerror.

Put text after #endif in comment.
parent 3a8e2ba9
/* Unexec for DEC alpha. schoepf@sc.ZIB-Berlin.DE (Rainer Schoepf). /* 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. This file is part of GNU Emacs.
...@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */ ...@@ -27,6 +27,10 @@ Boston, MA 02111-1307, USA. */
#include <sys/mman.h> #include <sys/mman.h>
#include <stdio.h> #include <stdio.h>
#include <varargs.h> #include <varargs.h>
#include <errno.h>
#ifdef HAVE_STRING_H
#include <string.h>
#endif
#if !defined (__NetBSD__) && !defined (__OpenBSD__) #if !defined (__NetBSD__) && !defined (__OpenBSD__)
#include <filehdr.h> #include <filehdr.h>
#include <aouthdr.h> #include <aouthdr.h>
...@@ -94,10 +98,11 @@ static void mark_x (); ...@@ -94,10 +98,11 @@ static void mark_x ();
if (lseek (_fd, _position, L_SET) != _position) \ if (lseek (_fd, _position, L_SET) != _position) \
fatal_unexec (_error_message, _error_arg); fatal_unexec (_error_message, _error_arg);
extern int errno; #ifdef HAVE_UNISTD_H
extern char *strerror (); #include <unistd.h>
#else
void *sbrk (); void *sbrk ();
#endif
#define EEOF -1 #define EEOF -1
...@@ -235,10 +240,10 @@ unexec (new_name, a_name, data_start, bss_start, entry_address) ...@@ -235,10 +240,10 @@ unexec (new_name, a_name, data_start, bss_start, entry_address)
#endif #endif
#ifdef _PDATA #ifdef _PDATA
CHECK_SCNHDR (pdata_section, _PDATA, STYP_PDATA); CHECK_SCNHDR (pdata_section, _PDATA, STYP_PDATA);
#endif _PDATA #endif /* _PDATA */
#ifdef _GOT #ifdef _GOT
CHECK_SCNHDR (got_section, _GOT, STYP_GOT); CHECK_SCNHDR (got_section, _GOT, STYP_GOT);
#endif _GOT #endif /* _GOT */
CHECK_SCNHDR (data_section, _DATA, STYP_DATA); CHECK_SCNHDR (data_section, _DATA, STYP_DATA);
#ifdef _XDATA #ifdef _XDATA
CHECK_SCNHDR (xdata_section, _XDATA, STYP_XDATA); CHECK_SCNHDR (xdata_section, _XDATA, STYP_XDATA);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment