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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
$NetBSD: patch-aa,v 1.3 1998/08/07 11:13:54 agc Exp $
*** Makefile.orig Tue May 30 06:14:14 1995
--- Makefile Fri Aug 11 16:02:11 1995
***************
*** 33,40 ****
SHELL = /bin/sh
CC = cc
#CC = gcc
! CFLAGS = -g
! #CFLAGS = -g -O -Wall
LDFLAGS =
LIBS =
--- 33,40 ----
SHELL = /bin/sh
CC = cc
#CC = gcc
! #CFLAGS = -g
! CFLAGS = -O2
LDFLAGS =
LIBS =
***************
*** 52,57 ****
--- 52,66 ----
tree.o util.o var.o vec.o version.o y.tab.o
OTHER = Makefile parse.y mksignal
GEN = esdump y.tab.c y.tab.h y.output token.h sigmsgs.c initial.c
+
+ all: es
+
+ install:
+ $(INSTALL) -c es $(PREFIX)/bin
+ $(INSTALL) -c esdebug $(PREFIX)/bin/esdebug
+ $(INSTALL) -c es.1 $(PREFIX)/man/man1
+ strip $(PREFIX)/bin/es
+ gzip -9nf $(PREFIX)/man/man1/es.1
es : ${OFILES} initial.o
${CC} -o es ${LDFLAGS} ${OFILES} initial.o ${LIBS}
--- prim-sys.c.orig Tue May 30 06:13:51 1995
+++ prim-sys.c Thu Apr 10 10:15:40 1997
@@ -194,7 +194,7 @@
static void printlimit(const Limit *limit, Boolean hard) {
struct rlimit rlim;
- long lim;
+ u_quad_t lim;
getrlimit(limit->flag, &rlim);
if (hard)
lim = rlim.rlim_max;
@@ -209,11 +209,11 @@
lim /= suf->amount;
break;
}
- print("%-8s\t%d%s\n", limit->name, lim, (suf == NULL || lim == 0) ? "" : suf->name);
+ print("%-8s\t%ud%s\n", limit->name, (unsigned int)lim, (suf == NULL || lim == 0) ? "" : suf->name);
}
}
-static long parselimit(const Limit *limit, char *s) {
+static u_quad_t parselimit(const Limit *limit, char *s) {
long lim;
char *t;
const Suffix *suf = limit->suffix;
--- main.c~ Tue May 30 06:13:50 1995
+++ main.c Thu Apr 10 09:20:49 1997
@@ -9,7 +9,7 @@
Boolean gcinfo = FALSE; /* -I */
#endif
-#if !HPUX && !defined(linux)
+#if !HPUX && !defined(linux) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
extern int getopt (int argc, char **argv, const char *optstring);
#endif
extern int optind;
--- stdenv.h~ Tue May 30 06:13:53 1995
+++ stdenv.h Thu Apr 10 09:32:22 1997
@@ -283,6 +283,7 @@
/* stdlib */
+#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__)
extern noreturn exit(int);
extern noreturn abort(void);
extern long strtol(const char *num, char **end, int base);
@@ -290,6 +291,7 @@
void *base, size_t nmemb, size_t size,
int (*compar)(const void *, const void *)
);
+#endif
/* setjmp */
--- util.c 1997/10/24 14:23:46 1.1
+++ util.c 1997/10/24 14:25:01
@@ -2,6 +2,10 @@
#include "es.h"
+#include <sys/param.h>
+
+#if !(defined(BSD) && BSD >= 199306)
+/* agc - just use the system strerror here */
/* strerror -- turn an error code into a string */
extern char *strerror(int n) {
extern int sys_nerr;
@@ -10,6 +14,7 @@
return "unknown error";
return sys_errlist[n];
}
+#endif
/* uerror -- print a unix error, our version of perror */
extern void uerror(char *s) {
|