aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-27 22:27:12 +0000
committerRichard M. Stallman1997-06-27 22:27:12 +0000
commite5d0f7094e505241863e57b33545f5a9d997484e (patch)
treef88a8b418d24b77354d8c5773edf77f9820f7d7a /src
parent9240b21dcea5754dc456f1a02284a692d9549127 (diff)
downloademacs-e5d0f7094e505241863e57b33545f5a9d997484e.tar.gz
emacs-e5d0f7094e505241863e57b33545f5a9d997484e.zip
[__NetBSD__]: Add some conditionals for NetBSD.
Diffstat (limited to 'src')
-rw-r--r--src/unexelf.c46
1 files changed, 44 insertions, 2 deletions
diff --git a/src/unexelf.c b/src/unexelf.c
index 77a26b232c3..10c3fa51128 100644
--- a/src/unexelf.c
+++ b/src/unexelf.c
@@ -420,17 +420,59 @@ 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#include <elf.h> 424#include <elf.h>
425#endif
424#include <sys/mman.h> 426#include <sys/mman.h>
425#if defined (__sony_news) && defined (_SYSTYPE_SYSV) 427#if defined (__sony_news) && defined (_SYSTYPE_SYSV)
426#include <sys/elf_mips.h> 428#include <sys/elf_mips.h>
427#include <sym.h> 429#include <sym.h>
428#endif /* __sony_news && _SYSTYPE_SYSV */ 430#endif /* __sony_news && _SYSTYPE_SYSV */
429 431
430#ifdef __alpha__ 432#if defined (__alpha__) && !defined (__NetBSD__)
431# include <sym.h> /* get COFF debugging symbol table declaration */ 433#include <sym.h> /* get COFF debugging symbol table declaration */
432#endif 434#endif
433 435
436#ifdef __NetBSD__
437/*
438 * NetBSD does not have normal-looking user-land ELF support.
439 */
440# ifdef __alpha__
441# define ELFSIZE 64
442# else
443# define ELFSIZE 32
444# endif
445# include <sys/exec_elf.h>
446
447# define PT_LOAD Elf_pt_load
448# define SHT_SYMTAB Elf_sht_symtab
449# define SHT_DYNSYM Elf_sht_dynsym
450# define SHT_NULL Elf_sht_null
451# define SHT_NOBITS Elf_sht_nobits
452# define SHT_REL Elf_sht_rel
453# define SHT_RELA Elf_sht_rela
454
455# define SHN_UNDEF Elf_eshn_undefined
456# define SHN_ABS Elf_eshn_absolute
457# define SHN_COMMON Elf_eshn_common
458
459/*
460 * The magic of picking the right size types is handled by the ELFSIZE
461 * definition above.
462 */
463# ifdef __STDC__
464# define ElfW(type) Elf_##type
465# else
466# define ElfW(type) Elf_/**/type
467# endif
468
469# ifdef __alpha__
470# include <sys/exec_ecoff.h>
471# define HDRR struct ecoff_symhdr
472# define pHDRR HDRR *
473# endif
474#endif /* __NetBSD__ */
475
434#if __GNU_LIBRARY__ - 0 >= 6 476#if __GNU_LIBRARY__ - 0 >= 6
435# include <link.h> /* get ElfW etc */ 477# include <link.h> /* get ElfW etc */
436#endif 478#endif