added djb ucspi-tcp patch provided by Johnny Halfmoon
[packages.git] / net / ucspi-tcp / patches / crosscompile.patch
1 diff -urN ucspi-tcp-0.88/Makefile ucspi-tcp-0.88.new/Makefile
2 --- ucspi-tcp-0.88/Makefile     2000-03-18 17:18:42.000000000 +0200
3 +++ ucspi-tcp-0.88.new/Makefile 2007-09-30 16:32:55.000000000 +0300
4 @@ -36,10 +36,6 @@
5  compile auto-str.c buffer.h readwrite.h exit.h
6         ./compile auto-str.c
7  
8 -auto_home.c: \
9 -auto-str conf-home
10 -       ./auto-str auto_home `head -1 conf-home` > auto_home.c
11 -
12  auto_home.o: \
13  compile auto_home.c
14         ./compile auto_home.c
15 @@ -305,10 +301,6 @@
16  compile fmt_ulong.c fmt.h
17         ./compile fmt_ulong.c
18  
19 -fork.h: \
20 -choose compile load tryvfork.c fork.h1 fork.h2
21 -       ./choose cl tryvfork fork.h1 fork.h2 > fork.h
22 -
23  getln.o: \
24  compile getln.c byte.h getln.h buffer.h stralloc.h gen_alloc.h
25         ./compile getln.c
26 @@ -317,24 +309,6 @@
27  compile getln2.c byte.h getln.h buffer.h stralloc.h gen_alloc.h
28         ./compile getln2.c
29  
30 -hassgact.h: \
31 -choose compile load trysgact.c hassgact.h1 hassgact.h2
32 -       ./choose cl trysgact hassgact.h1 hassgact.h2 > hassgact.h
33 -
34 -hassgprm.h: \
35 -choose compile load trysgprm.c hassgprm.h1 hassgprm.h2
36 -       ./choose cl trysgprm hassgprm.h1 hassgprm.h2 > hassgprm.h
37 -
38 -hasshsgr.h: \
39 -choose compile load tryshsgr.c hasshsgr.h1 hasshsgr.h2 chkshsgr \
40 -warn-shsgr
41 -       ./chkshsgr || ( cat warn-shsgr; exit 1 )
42 -       ./choose clr tryshsgr hasshsgr.h1 hasshsgr.h2 > hasshsgr.h
43 -
44 -haswaitp.h: \
45 -choose compile load trywaitp.c haswaitp.h1 haswaitp.h2
46 -       ./choose cl trywaitp haswaitp.h1 haswaitp.h2 > haswaitp.h
47 -
48  hier.o: \
49  compile hier.c auto_home.h
50         ./compile hier.c
51 @@ -362,10 +336,6 @@
52  compile instcheck.c strerr.h error.h readwrite.h exit.h
53         ./compile instcheck.c
54  
55 -iopause.h: \
56 -choose compile trypoll.c iopause.h1 iopause.h2
57 -       ./choose clr trypoll iopause.h1 iopause.h2 > iopause.h
58 -
59  iopause.o: \
60  compile iopause.c taia.h tai.h uint64.h select.h iopause.h taia.h
61         ./compile iopause.c
62 @@ -521,10 +491,6 @@
63  compile seek_set.c seek.h
64         ./compile seek_set.c
65  
66 -select.h: \
67 -choose compile trysysel.c select.h1 select.h2
68 -       ./choose c trysysel select.h1 select.h2 > select.h
69 -
70  setup: \
71  it install
72         ./install
73 @@ -791,10 +757,6 @@
74  compile uint32_unpack.c uint32.h
75         ./compile uint32_unpack.c
76  
77 -uint64.h: \
78 -choose compile load tryulong64.c uint64.h1 uint64.h2
79 -       ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h
80 -
81  unix.a: \
82  makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \
83  buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \
84 diff -urN ucspi-tcp-0.88/auto_home.c ucspi-tcp-0.88.new/auto_home.c
85 --- ucspi-tcp-0.88/auto_home.c  1970-01-01 03:00:00.000000000 +0300
86 +++ ucspi-tcp-0.88.new/auto_home.c      2007-09-30 16:33:13.000000000 +0300
87 @@ -0,0 +1,3 @@
88 +const char auto_home[] = "\
89 +\057\165\163\162\
90 +";
91 diff -urN ucspi-tcp-0.88/conf-cc ucspi-tcp-0.88.new/conf-cc
92 --- ucspi-tcp-0.88/conf-cc      2007-09-30 14:17:05.000000000 +0300
93 +++ ucspi-tcp-0.88.new/conf-cc  2007-09-30 15:13:43.000000000 +0300
94 @@ -1,3 +1,3 @@
95 -gcc -O2
96 +$TARGET_CC $TARGET_CFLAGS -include errno.h
97  
98  This will be used to compile .c files.
99 diff -urN ucspi-tcp-0.88/conf-home ucspi-tcp-0.88.new/conf-home
100 --- ucspi-tcp-0.88/conf-home    2000-03-18 17:18:42.000000000 +0200
101 +++ ucspi-tcp-0.88.new/conf-home        2007-09-30 14:12:46.000000000 +0300
102 @@ -1,4 +1,4 @@
103 -/usr/local
104 +/usr
105  
106  This is the ucspi-tcp home directory. Programs will be installed in
107  .../bin.
108 diff -urN ucspi-tcp-0.88/conf-ld ucspi-tcp-0.88.new/conf-ld
109 --- ucspi-tcp-0.88/conf-ld      2000-03-18 17:18:42.000000000 +0200
110 +++ ucspi-tcp-0.88.new/conf-ld  2007-09-30 15:13:53.000000000 +0300
111 @@ -1,3 +1,3 @@
112 -gcc -s
113 +$TARGET_CC -s $TARGET_LDFLAGS
114  
115  This will be used to link .o files into an executable.
116 diff -urN ucspi-tcp-0.88/fork.h ucspi-tcp-0.88.new/fork.h
117 --- ucspi-tcp-0.88/fork.h       1970-01-01 03:00:00.000000000 +0300
118 +++ ucspi-tcp-0.88.new/fork.h   2007-09-30 14:09:38.000000000 +0300
119 @@ -0,0 +1,9 @@
120 +#ifndef FORK_H
121 +#define FORK_H
122 +
123 +/* sysdep: +vfork */
124 +
125 +extern int fork();
126 +extern int vfork();
127 +
128 +#endif
129 diff -urN ucspi-tcp-0.88/hassgact.h ucspi-tcp-0.88.new/hassgact.h
130 --- ucspi-tcp-0.88/hassgact.h   1970-01-01 03:00:00.000000000 +0300
131 +++ ucspi-tcp-0.88.new/hassgact.h       2007-09-30 14:09:38.000000000 +0300
132 @@ -0,0 +1,2 @@
133 +/* sysdep: +sigaction */
134 +#define HASSIGACTION 1
135 diff -urN ucspi-tcp-0.88/hassgprm.h ucspi-tcp-0.88.new/hassgprm.h
136 --- ucspi-tcp-0.88/hassgprm.h   1970-01-01 03:00:00.000000000 +0300
137 +++ ucspi-tcp-0.88.new/hassgprm.h       2007-09-30 14:09:38.000000000 +0300
138 @@ -0,0 +1,2 @@
139 +/* sysdep: +sigprocmask */
140 +#define HASSIGPROCMASK 1
141 diff -urN ucspi-tcp-0.88/hasshsgr.h ucspi-tcp-0.88.new/hasshsgr.h
142 --- ucspi-tcp-0.88/hasshsgr.h   1970-01-01 03:00:00.000000000 +0300
143 +++ ucspi-tcp-0.88.new/hasshsgr.h       2007-09-30 14:09:38.000000000 +0300
144 @@ -0,0 +1 @@
145 +/* sysdep: -shortsetgroups */
146 diff -urN ucspi-tcp-0.88/haswaitp.h ucspi-tcp-0.88.new/haswaitp.h
147 --- ucspi-tcp-0.88/haswaitp.h   1970-01-01 03:00:00.000000000 +0300
148 +++ ucspi-tcp-0.88.new/haswaitp.h       2007-09-30 14:09:38.000000000 +0300
149 @@ -0,0 +1,2 @@
150 +/* sysdep: +waitpid */
151 +#define HASWAITPID 1
152 diff -urN ucspi-tcp-0.88/iopause.h ucspi-tcp-0.88.new/iopause.h
153 --- ucspi-tcp-0.88/iopause.h    1970-01-01 03:00:00.000000000 +0300
154 +++ ucspi-tcp-0.88.new/iopause.h        2007-09-30 14:09:38.000000000 +0300
155 @@ -0,0 +1,18 @@
156 +#ifndef IOPAUSE_H
157 +#define IOPAUSE_H
158 +
159 +/* sysdep: +poll */
160 +#define IOPAUSE_POLL
161 +
162 +#include <sys/types.h>
163 +#include <poll.h>
164 +
165 +typedef struct pollfd iopause_fd;
166 +#define IOPAUSE_READ POLLIN
167 +#define IOPAUSE_WRITE POLLOUT
168 +
169 +#include "taia.h"
170 +
171 +extern void iopause(iopause_fd *,unsigned int,struct taia *,struct taia *);
172 +
173 +#endif
174 diff -urN ucspi-tcp-0.88/select.h ucspi-tcp-0.88.new/select.h
175 --- ucspi-tcp-0.88/select.h     1970-01-01 03:00:00.000000000 +0300
176 +++ ucspi-tcp-0.88.new/select.h 2007-09-30 14:09:38.000000000 +0300
177 @@ -0,0 +1,11 @@
178 +#ifndef SELECT_H
179 +#define SELECT_H
180 +
181 +/* sysdep: +sysselect */
182 +
183 +#include <sys/types.h>
184 +#include <sys/time.h>
185 +#include <sys/select.h>
186 +extern int select();
187 +
188 +#endif
189 diff -urN ucspi-tcp-0.88/uint64.h ucspi-tcp-0.88.new/uint64.h
190 --- ucspi-tcp-0.88/uint64.h     1970-01-01 03:00:00.000000000 +0300
191 +++ ucspi-tcp-0.88.new/uint64.h 2007-09-30 14:16:22.000000000 +0300
192 @@ -0,0 +1,8 @@
193 +#ifndef UINT64_H
194 +#define UINT64_H
195 +
196 +/* sysdep: -ulong64 */
197 +
198 +typedef unsigned long long uint64;
199 +
200 +#endif