diff options
Diffstat (limited to 'editors/emacs/patches')
-rw-r--r-- | editors/emacs/patches/patch-az | 60 |
1 files changed, 42 insertions, 18 deletions
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) { |