aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-09-06 19:40:22 +0000
committerRichard M. Stallman1997-09-06 19:40:22 +0000
commitcb1ee8118fc9df3e04fc47873a5dff1662de7dac (patch)
tree6f8d3aafecda73dcc2224c0be72bae24e10b2611 /src
parent61e630894af1c2adde2aa0a7018f00f2dcebafd4 (diff)
downloademacs-cb1ee8118fc9df3e04fc47873a5dff1662de7dac.tar.gz
emacs-cb1ee8118fc9df3e04fc47873a5dff1662de7dac.zip
Test __OpenBSD__ along with __NetBSD__.
[__OpenBSD__]: Include sys/exec_elf.h.
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 79a398228ea..0a8b6068d30 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -420,7 +420,7 @@ Filesz Memsz Flags Align
420#include <errno.h> 420#include <errno.h>
421#include <unistd.h> 421#include <unistd.h>
422#include <fcntl.h> 422#include <fcntl.h>
423#ifndef __NetBSD__ 423#if !defined (__NetBSD__) && !defined (__OpenBSD__)
424#include <elf.h> 424#include <elf.h>
425#endif 425#endif
426#include <sys/mman.h> 426#include <sys/mman.h>
@@ -429,7 +429,7 @@ Filesz Memsz Flags Align
429#include <sym.h> 429#include <sym.h>
430#endif /* __sony_news && _SYSTYPE_SYSV */ 430#endif /* __sony_news && _SYSTYPE_SYSV */
431 431
432#if defined (__alpha__) && !defined (__NetBSD__) 432#if defined (__alpha__) && !defined (__NetBSD__) && !defined (__OpenBSD__)
433#include <sym.h> /* get COFF debugging symbol table declaration */ 433#include <sym.h> /* get COFF debugging symbol table declaration */
434#endif 434#endif
435 435
@@ -473,6 +473,10 @@ Filesz Memsz Flags Align
473# endif 473# endif
474#endif /* __NetBSD__ */ 474#endif /* __NetBSD__ */
475 475
476#ifdef __OpenBSD__
477# include <sys/exec_elf.h>
478#endif
479
476#if __GNU_LIBRARY__ - 0 >= 6 480#if __GNU_LIBRARY__ - 0 >= 6
477# include <link.h> /* get ElfW etc */ 481# include <link.h> /* get ElfW etc */
478#endif 482#endif
@@ -682,7 +686,7 @@ unexec (new_name, old_name, data_start, bss_start, entry_address)
682 old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr; 686 old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr;
683 old_bss_size = OLD_SECTION_H (old_bss_index).sh_size; 687 old_bss_size = OLD_SECTION_H (old_bss_index).sh_size;
684#endif /* not (__sony_news && _SYSTYPE_SYSV) */ 688#endif /* not (__sony_news && _SYSTYPE_SYSV) */
685#if defined(emacs) || !defined(DEBUG) 689#if defined (emacs) || !defined (DEBUG)
686 new_bss_addr = (ElfW(Addr)) sbrk (0); 690 new_bss_addr = (ElfW(Addr)) sbrk (0);
687#else 691#else
688 new_bss_addr = old_bss_addr + old_bss_size + 0x1234; 692 new_bss_addr = old_bss_addr + old_bss_size + 0x1234;