diff options
author | mrg <mrg@pkgsrc.org> | 1999-11-05 11:04:27 +0000 |
---|---|---|
committer | mrg <mrg@pkgsrc.org> | 1999-11-05 11:04:27 +0000 |
commit | 551a8d4e78993e7b21d3162c1914cf6b0fa10435 (patch) | |
tree | 8a2c1c311c682d5186199e980f1a2c3933d50fcb /editors | |
parent | 8d2432c5fd302661d47ea308df957049d8173e7f (diff) | |
download | pkgsrc-551a8d4e78993e7b21d3162c1914cf6b0fa10435.tar.gz |
make this work with NetBSD <elf.h>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/emacs/files/patch-sum | 4 | ||||
-rw-r--r-- | editors/emacs/patches/patch-az | 60 |
2 files changed, 44 insertions, 20 deletions
diff --git a/editors/emacs/files/patch-sum b/editors/emacs/files/patch-sum index 4762a9463a2..bbbcb6db4e9 100644 --- a/editors/emacs/files/patch-sum +++ b/editors/emacs/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.1 1999/07/09 13:50:42 agc Exp $ +$NetBSD: patch-sum,v 1.2 1999/11/05 11:04:27 mrg Exp $ MD5 (patch-aa) = 65f12a75b1e2c20e0bbaba6d674f3c72 MD5 (patch-ab) = a58fd4f1a54c6e85abff4eeaac1e69f8 @@ -24,7 +24,7 @@ MD5 (patch-av) = 7415bc9d2dc3a0ca1807a8bc887f7e64 MD5 (patch-aw) = 09f1407e71d45c459c2bc0eb512e2cc5 MD5 (patch-ax) = 46750ed00d5bff9fea4f330b0ca0fc41 MD5 (patch-ay) = 3410727467487707ea5b675e439f8ade -MD5 (patch-az) = 971f80d35e6f326d0cf007b54389bafd +MD5 (patch-az) = 35e3de03411b94b74ce4044edfb019c7 MD5 (patch-ba) = ce0d011c7bc0ff5214e13332326baa6a MD5 (patch-bb) = 97d9629a376bbfc4691605be32c8194d MD5 (patch-bc) = f38d4bc4159920c81cb7d5f3770ace48 diff --git a/editors/emacs/patches/patch-az b/editors/emacs/patches/patch-az index db7af970bba..350b548a854 100644 --- a/editors/emacs/patches/patch-az +++ b/editors/emacs/patches/patch-az @@ -1,8 +1,32 @@ -$NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ +$NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $ ---- src/unexelf.c.orig Sun Aug 9 22:33:12 1998 -+++ src/unexelf.c Thu Jun 3 23:31:50 1999 -@@ -501,9 +501,16 @@ +--- src/unexelf.c.orig Mon Aug 10 12:33:12 1998 ++++ src/unexelf.c Fri Nov 5 21:35:39 1999 +@@ -473,6 +473,12 @@ + # else + # define ELFSIZE 32 + # endif ++ ++#include <sys/param.h> ++ ++/* NetBSD 1.4M has sane <elf.h> */ ++ ++#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 104130000 + # include <sys/exec_elf.h> + + # define PT_LOAD Elf_pt_load +@@ -487,6 +493,10 @@ + # define SHN_ABS Elf_eshn_absolute + # define SHN_COMMON Elf_eshn_common + ++#else ++# include <elf.h> ++#endif ++ + /* + * The magic of picking the right size types is handled by the ELFSIZE + * definition above. +@@ -501,9 +511,16 @@ # include <sys/exec_ecoff.h> # define HDRR struct ecoff_symhdr # define pHDRR HDRR * @@ -20,7 +44,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ #ifdef __OpenBSD__ # include <sys/exec_elf.h> #endif -@@ -527,6 +534,14 @@ +@@ -527,6 +544,14 @@ extern void fatal (char *, ...); #endif @@ -35,7 +59,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ #ifndef ELF_BSS_SECTION_NAME #define ELF_BSS_SECTION_NAME ".bss" #endif -@@ -585,6 +600,47 @@ +@@ -585,6 +610,47 @@ return x - rem + y; } @@ -83,7 +107,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ /* **************************************************************** * unexec * -@@ -620,9 +676,10 @@ +@@ -620,9 +686,10 @@ ElfW(Addr) new_data2_addr; int n, nn, old_bss_index, old_data_index, new_data2_index; @@ -96,7 +120,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ struct stat stat_buf; /* Open the old file & map it into the address space. */ -@@ -672,7 +729,7 @@ +@@ -672,7 +739,7 @@ if (old_bss_index == old_file_h->e_shnum) fatal ("Can't find .bss in %s.\n", old_name, 0); @@ -105,7 +129,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum; old_sbss_index++) { -@@ -713,10 +770,10 @@ +@@ -713,10 +780,10 @@ } if (old_mdebug_index == old_file_h->e_shnum) old_mdebug_index = 0; @@ -118,7 +142,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ #if defined (emacs) || !defined (DEBUG) new_bss_addr = (ElfW(Addr)) sbrk (0); #else -@@ -724,9 +781,9 @@ +@@ -724,9 +791,9 @@ #endif new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; @@ -130,7 +154,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ #ifdef DEBUG fprintf (stderr, "old_bss_index %d\n", old_bss_index); -@@ -811,14 +868,14 @@ +@@ -811,14 +878,14 @@ if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) alignment = OLD_SECTION_H (old_bss_index).sh_addralign; @@ -148,7 +172,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ if (NEW_PROGRAM_H (n).p_type == PT_LOAD && (round_up ((NEW_PROGRAM_H (n)).p_vaddr -@@ -830,11 +887,16 @@ +@@ -830,11 +897,16 @@ if (n < 0) fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0); @@ -165,7 +189,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ #if 0 /* Maybe allow section after data2 - does this ever happen? */ for (n = new_file_h->e_phnum - 1; n >= 0; n--) { -@@ -867,15 +929,15 @@ +@@ -867,15 +939,15 @@ { caddr_t src; int temp_index; @@ -184,7 +208,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ if (n == temp_index) { /* Steal the data section header for this data2 section. */ -@@ -901,11 +963,11 @@ +@@ -901,11 +973,11 @@ old_file_h->e_shentsize); if (n == old_bss_index @@ -198,7 +222,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ ) { /* NN should be `old_bss_index + 1' at this point. */ -@@ -916,6 +978,28 @@ +@@ -916,6 +988,28 @@ this section will be placed in exactly the same place. */ NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (nn).sh_addralign; NEW_SECTION_H (nn).sh_size = 0; @@ -227,7 +251,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ } else { -@@ -970,14 +1054,14 @@ +@@ -970,14 +1064,14 @@ || !strcmp ((old_section_names + NEW_SECTION_H(n).sh_name), ".sdata") #endif @@ -244,7 +268,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".data1")) src = (caddr_t) OLD_SECTION_H (n).sh_addr; -@@ -993,18 +1077,7 @@ +@@ -993,18 +1087,7 @@ == 0) { pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base); @@ -264,7 +288,7 @@ $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ } #endif /* __alpha__ */ -@@ -1017,20 +1090,11 @@ +@@ -1017,20 +1100,11 @@ if (diff) { |