summaryrefslogtreecommitdiff
path: root/lang/elk/patches/patch-d
blob: 84ae97938fec6619c91f744c541732a6ee48b67c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
$NetBSD: patch-d,v 1.3 1998/08/07 11:08:55 agc Exp $

*** src/dump-vanilla.c.orig	Thu Jun 29 13:55:51 1995
--- src/dump-vanilla.c	Thu Sep  7 15:00:35 1995
***************
*** 12,17 ****
--- 12,21 ----
  
  extern void *sbrk();
  
+ #if defined(__FreeBSD__) || defined(__NetBSD__)
+ extern etext;
+ #endif
+ 
  #if defined(hp9000s300) || defined(__hp9000s300) || defined(__hp9000s300__)
  static int getpagesize () {
      return EXEC_PAGESIZE;
***************
*** 113,125 ****
      close (afd);
  #if defined(__bsdi__)
      data_start = N_DATADDR(hdr);
  #else
      data_start = hdr.a_text;
  #if defined(sun) || defined(__sun__)
      data_start += pagemask+1;
  #endif
      data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
- #endif
      data_end = (unsigned)sbrk (0);
  #if !defined(__bsdi__)
      data_end = (data_end + pagemask) & ~pagemask;
--- 117,131 ----
      close (afd);
  #if defined(__bsdi__)
      data_start = N_DATADDR(hdr);
+ #elif defined (__FreeBSD__) || defined(__NetBSD__)
+     data_start = (int) &etext;
  #else
      data_start = hdr.a_text;
+ #endif
  #if defined(sun) || defined(__sun__)
      data_start += pagemask+1;
  #endif
      data_start = (data_start + SEG_SIZ-1) & ~(SEG_SIZ-1);
      data_end = (unsigned)sbrk (0);
  #if !defined(__bsdi__)
      data_end = (data_end + pagemask) & ~pagemask;
*** src/print.c.orig	Mon Aug  7 09:28:42 1995
--- src/print.c	Thu Sep  7 14:58:28 1995
***************
*** 6,11 ****
--- 6,12 ----
  #include <errno.h>
  #include <ctype.h>
  #include <varargs.h>
+ #include <sys/param.h>
  
  #ifdef FLUSH_TIOCFLUSH
  #  include <sys/ioctl.h>
***************
*** 555,561 ****
      register c;
      char buf[256];
      extern sys_nerr;
! #ifndef __bsdi__
      extern char *sys_errlist[];
  #endif
      GC_Node;
--- 556,562 ----
      register c;
      char buf[256];
      extern sys_nerr;
! #if !(defined(BSD) && (BSD >= 199306))
      extern char *sys_errlist[];
  #endif
      GC_Node;