summaryrefslogtreecommitdiff
path: root/emulators
diff options
context:
space:
mode:
authorwiz <wiz>2011-12-19 16:20:56 +0000
committerwiz <wiz>2011-12-19 16:20:56 +0000
commitef4e85b064d206e93d9189d0e9c2a7e7bbc791dd (patch)
tree236ea355a1c8d429ede84dcda1f26cf76eaacb64 /emulators
parent9fadfb33f17b6981fdef8051b89ead65fb181d3e (diff)
downloadpkgsrc-ef4e85b064d206e93d9189d0e9c2a7e7bbc791dd.tar.gz
Fix build with gcc-4.5 and on systems providing POSIX getline().
Diffstat (limited to 'emulators')
-rw-r--r--emulators/p11/distinfo4
-rw-r--r--emulators/p11/patches/patch-IOProgs_epp__bpf.c76
-rw-r--r--emulators/p11/patches/patch-Utils_mktext.c37
3 files changed, 116 insertions, 1 deletions
diff --git a/emulators/p11/distinfo b/emulators/p11/distinfo
index 7ff31f62853..f919702780e 100644
--- a/emulators/p11/distinfo
+++ b/emulators/p11/distinfo
@@ -1,8 +1,10 @@
-$NetBSD: distinfo,v 1.3 2007/01/27 12:02:16 wiz Exp $
+$NetBSD: distinfo,v 1.4 2011/12/19 16:20:56 wiz Exp $
SHA1 (p11-2.10i.tar.bz2) = 7e485e4736f70ae907c22d37d57cfb5e1ae95b51
RMD160 (p11-2.10i.tar.bz2) = c5038d908fabf37fe122c6616a13551b2a8265df
Size (p11-2.10i.tar.bz2) = 372597 bytes
+SHA1 (patch-IOProgs_epp__bpf.c) = e8a56c80ba5ec10e142e3a2145446e5fb09d2ea0
+SHA1 (patch-Utils_mktext.c) = 0c41b28f2a87c93dde902cacf9d212f78fbdf1f3
SHA1 (patch-aa) = 6b71f678ec2e8ae3acbcbdbe61af0c4e77684c5f
SHA1 (patch-ab) = 0c6956dbb47927ac15572ae66509384993a08278
SHA1 (patch-ac) = 77a747358e0524f07ad86a388737d5c98390dd26
diff --git a/emulators/p11/patches/patch-IOProgs_epp__bpf.c b/emulators/p11/patches/patch-IOProgs_epp__bpf.c
new file mode 100644
index 00000000000..2ff2943b868
--- /dev/null
+++ b/emulators/p11/patches/patch-IOProgs_epp__bpf.c
@@ -0,0 +1,76 @@
+$NetBSD: patch-IOProgs_epp__bpf.c,v 1.1 2011/12/19 16:20:56 wiz Exp $
+
+Avoid using compiler-defined names.
+
+--- IOProgs/epp_bpf.c.orig 2000-12-04 17:03:43.000000000 +0000
++++ IOProgs/epp_bpf.c
+@@ -193,7 +193,7 @@ void
+ gen_filter()
+ {
+ Bpf_insn *p = insns;
+- Bpf_insn *true, *false;
++ Bpf_insn *btrue, *bfalse;
+ u_long hw, hl;
+ u_int i;
+
+@@ -207,16 +207,16 @@ gen_filter()
+ /*
+ * all, but ours
+ */
+- false = &insns[4];
+- true = false + 1;
++ bfalse = &insns[4];
++ btrue = bfalse + 1;
+ hw = SPLIT_W2(hwaddr);
+ hl = SPLIT_H0(hwaddr);
+ GEN_STMT(p, BPF_LD+BPF_W+BPF_ABS, 8);
+- GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hw, 0, true-(p+1));
++ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hw, 0, btrue-(p+1));
+ GEN_STMT(p, BPF_LD+BPF_H+BPF_ABS, 6);
+- GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, 0, true-(p+1));
++ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, 0, btrue-(p+1));
+
+- assert(p == false);
++ assert(p == bfalse);
+ GEN_STMT(p, BPF_RET+BPF_K, 0);
+ GEN_STMT(p, BPF_RET+BPF_K, (u_int)-1);
+
+@@ -224,10 +224,10 @@ gen_filter()
+ /*
+ * normal and, perhaps, allmulti
+ */
+- false = &insns[f.naddr * 4 /* 4 instructions per address */
++ bfalse = &insns[f.naddr * 4 /* 4 instructions per address */
+ + 4 /* filter for own address */
+ + 2 * (f.allmulti != 0)];
+- true = false + 1;
++ btrue = bfalse + 1;
+
+ /*
+ * filter own packets
+@@ -237,11 +237,11 @@ gen_filter()
+ GEN_STMT(p, BPF_LD+BPF_W+BPF_ABS, 8);
+ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hw, 0, 2);
+ GEN_STMT(p, BPF_LD+BPF_H+BPF_ABS, 6);
+- GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, false-(p+1), 0);
++ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, bfalse-(p+1), 0);
+
+ if(f.allmulti) {
+ GEN_STMT(p, BPF_LD+BPF_B+BPF_ABS, 0);
+- GEN_JUMP(p, BPF_JMP+BPF_JSET+BPF_K, 1, true-(p+1), 0);
++ GEN_JUMP(p, BPF_JMP+BPF_JSET+BPF_K, 1, btrue-(p+1), 0);
+ }
+
+ for(i = 0; i < f.naddr; i++) {
+@@ -250,9 +250,9 @@ gen_filter()
+ GEN_STMT(p, BPF_LD+BPF_W+BPF_ABS, 2);
+ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hw, 0, 2);
+ GEN_STMT(p, BPF_LD+BPF_H+BPF_ABS, 0);
+- GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, true-(p+1), 0);
++ GEN_JUMP(p, BPF_JMP+BPF_JEQ+BPF_K, hl, btrue-(p+1), 0);
+ }
+- assert(p == false);
++ assert(p == bfalse);
+ GEN_STMT(p, BPF_RET+BPF_K, 0);
+ GEN_STMT(p, BPF_RET+BPF_K, (u_int)-1);
+ }
diff --git a/emulators/p11/patches/patch-Utils_mktext.c b/emulators/p11/patches/patch-Utils_mktext.c
new file mode 100644
index 00000000000..af453f0f2af
--- /dev/null
+++ b/emulators/p11/patches/patch-Utils_mktext.c
@@ -0,0 +1,37 @@
+$NetBSD: patch-Utils_mktext.c,v 1.1 2011/12/19 16:20:56 wiz Exp $
+
+Fix conflict with POSIX getline().
+
+--- Utils/mktext.c.orig 2001-07-09 08:09:10.000000000 +0000
++++ Utils/mktext.c
+@@ -61,7 +61,7 @@ void wordlist(void);
+ void stringlist(void);
+ void ptrlist(void);
+ void add_code(u_char);
+-char *getline(void);
++char *mgetline(void);
+ void parse_label(char *);
+ void parse_string(char *);
+ void defs(void);
+@@ -122,10 +122,10 @@ main(int argc, char *argv[])
+ fprintf(outfp, "\t.word\tT0\n");
+ fprintf(outfp, "\n");
+ }
+- while((line = getline()) != NULL) {
++ while((line = mgetline()) != NULL) {
+ parse_label(line);
+ free(line);
+- if((line = getline()) == NULL)
++ if((line = mgetline()) == NULL)
+ panic("no string after label '%s'", cstr->name);
+ parse_string(line);
+ free(line);
+@@ -158,7 +158,7 @@ usage()
+
+
+ char *
+-getline()
++mgetline()
+ {
+ char *line, *p;
+