1 |
vapier 14/12/30 22:28:36 |
2 |
|
3 |
Added: 0.88-protos-rblspp.patch 0.88-uint-headers.patch |
4 |
0.88-large-responses.patch |
5 |
0.88-protos-no-ipv6.patch 0.88-ar-ranlib.patch |
6 |
0.88-protos-ipv6.patch 0.88-protos.patch |
7 |
Log: |
8 |
Update to EAPI=4. Re-add support for USE=ipv6. Respect AR/RANLIB in env. Clean up various build warnings. #262273 by Brandon Turner. |
9 |
|
10 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-rblspp.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: 0.88-protos-rblspp.patch |
19 |
=================================================================== |
20 |
rely on standard POSIX headers to fix globs of warnings |
21 |
|
22 |
requires 0.88-protos.patch first |
23 |
|
24 |
--- a/rblspp.c |
25 |
+++ b/rblspp.c |
26 |
@@ -1,3 +1,4 @@ |
27 |
+#include <stdlib.h> |
28 |
#include "byte.h" |
29 |
#include "str.h" |
30 |
#include "scan.h" |
31 |
|
32 |
|
33 |
|
34 |
1.1 sys-apps/ucspi-tcp/files/0.88-uint-headers.patch |
35 |
|
36 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-uint-headers.patch?rev=1.1&view=markup |
37 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-uint-headers.patch?rev=1.1&content-type=text/plain |
38 |
|
39 |
Index: 0.88-uint-headers.patch |
40 |
=================================================================== |
41 |
use stdint.h rather than hand guessing the underlying size |
42 |
|
43 |
--- a/tryulong32.c |
44 |
+++ /dev/null |
45 |
@@ -1,11 +0,0 @@ |
46 |
-main() |
47 |
-{ |
48 |
- unsigned long u; |
49 |
- u = 1; |
50 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
51 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
52 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
53 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
54 |
- if (!u) _exit(0); |
55 |
- _exit(1); |
56 |
-} |
57 |
--- a/tryulong64.c |
58 |
+++ /dev/null |
59 |
@@ -1,11 +0,0 @@ |
60 |
-main() |
61 |
-{ |
62 |
- unsigned long u; |
63 |
- u = 1; |
64 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
65 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
66 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
67 |
- u += u; u += u; u += u; u += u; u += u; u += u; u += u; u += u; |
68 |
- if (!u) _exit(1); |
69 |
- _exit(0); |
70 |
-} |
71 |
--- a/uint32.h1 |
72 |
+++ /dev/null |
73 |
@@ -1,11 +0,0 @@ |
74 |
-#ifndef UINT32_H |
75 |
-#define UINT32_H |
76 |
- |
77 |
-typedef unsigned int uint32; |
78 |
- |
79 |
-extern void uint32_pack(char *,uint32); |
80 |
-extern void uint32_pack_big(char *,uint32); |
81 |
-extern void uint32_unpack(const char *,uint32 *); |
82 |
-extern void uint32_unpack_big(const char *,uint32 *); |
83 |
- |
84 |
-#endif |
85 |
--- a/uint32.h2 |
86 |
+++ /dev/null |
87 |
@@ -1,11 +0,0 @@ |
88 |
-#ifndef UINT32_H |
89 |
-#define UINT32_H |
90 |
- |
91 |
-typedef unsigned long uint32; |
92 |
- |
93 |
-extern void uint32_pack(char *,uint32); |
94 |
-extern void uint32_pack_big(char *,uint32); |
95 |
-extern void uint32_unpack(const char *,uint32 *); |
96 |
-extern void uint32_unpack_big(const char *,uint32 *); |
97 |
- |
98 |
-#endif |
99 |
--- a/uint64.h1 |
100 |
+++ /dev/null |
101 |
@@ -1,8 +0,0 @@ |
102 |
-#ifndef UINT64_H |
103 |
-#define UINT64_H |
104 |
- |
105 |
-/* sysdep: -ulong64 */ |
106 |
- |
107 |
-typedef unsigned long long uint64; |
108 |
- |
109 |
-#endif |
110 |
--- a/uint64.h2 |
111 |
+++ /dev/null |
112 |
@@ -1,8 +0,0 @@ |
113 |
-#ifndef UINT64_H |
114 |
-#define UINT64_H |
115 |
- |
116 |
-/* sysdep: +ulong64 */ |
117 |
- |
118 |
-typedef unsigned long uint64; |
119 |
- |
120 |
-#endif |
121 |
--- /dev/null |
122 |
+++ b/uint32.h |
123 |
@@ -0,0 +1,12 @@ |
124 |
+#ifndef UINT32_H |
125 |
+#define UINT32_H |
126 |
+ |
127 |
+#include <stdint.h> |
128 |
+typedef uint32_t uint32; |
129 |
+ |
130 |
+extern void uint32_pack(char *,uint32); |
131 |
+extern void uint32_pack_big(char *,uint32); |
132 |
+extern void uint32_unpack(const char *,uint32 *); |
133 |
+extern void uint32_unpack_big(const char *,uint32 *); |
134 |
+ |
135 |
+#endif |
136 |
--- /dev/null |
137 |
+++ b/uint64.h |
138 |
@@ -0,0 +1,8 @@ |
139 |
+#ifndef UINT64_H |
140 |
+#define UINT64_H |
141 |
+ |
142 |
+#include <stdint.h> |
143 |
+ |
144 |
+typedef uint64_t uint64; |
145 |
+ |
146 |
+#endif |
147 |
--- a/Makefile |
148 |
+++ b/Makefile |
149 |
@@ -788,13 +788,6 @@ uint16_unpack.o: \ |
150 |
compile uint16_unpack.c uint16.h |
151 |
./compile uint16_unpack.c |
152 |
|
153 |
-uint32.h: \ |
154 |
-tryulong32.c compile load uint32.h1 uint32.h2 |
155 |
- ( ( ./compile tryulong32.c && ./load tryulong32 && \ |
156 |
- ./tryulong32 ) >/dev/null 2>&1 \ |
157 |
- && cat uint32.h2 || cat uint32.h1 ) > uint32.h |
158 |
- rm -f tryulong32.o tryulong32 |
159 |
- |
160 |
uint32_pack.o: \ |
161 |
compile uint32_pack.c uint32.h |
162 |
./compile uint32_pack.c |
163 |
@@ -803,10 +796,6 @@ uint32_unpack.o: \ |
164 |
compile uint32_unpack.c uint32.h |
165 |
./compile uint32_unpack.c |
166 |
|
167 |
-uint64.h: \ |
168 |
-choose compile load tryulong64.c uint64.h1 uint64.h2 |
169 |
- ./choose clr tryulong64 uint64.h1 uint64.h2 > uint64.h |
170 |
- |
171 |
unix.a: \ |
172 |
makelib alloc.o alloc_re.o buffer.o buffer_0.o buffer_1.o buffer_2.o \ |
173 |
buffer_copy.o buffer_get.o buffer_put.o env.o error.o error_str.o \ |
174 |
|
175 |
|
176 |
|
177 |
1.1 sys-apps/ucspi-tcp/files/0.88-large-responses.patch |
178 |
|
179 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-large-responses.patch?rev=1.1&view=markup |
180 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-large-responses.patch?rev=1.1&content-type=text/plain |
181 |
|
182 |
Index: 0.88-large-responses.patch |
183 |
=================================================================== |
184 |
12 Aug 2003; Robin H. Johnson <robbat2@g.o>: |
185 |
|
186 |
allow larger responses |
187 |
|
188 |
--- a/rblsmtpd.c |
189 |
+++ b/rblsmtpd.c |
190 |
@@ -163,7 +163,7 @@ void rblsmtpd(void) |
191 |
else |
192 |
if (!stralloc_copys(&message,"553 ")) nomem(); |
193 |
|
194 |
- if (text.len > 200) text.len = 200; |
195 |
+ if (text.len > 500) text.len = 500; |
196 |
if (!stralloc_cat(&message,&text)) nomem(); |
197 |
for (i = 0;i < message.len;++i) |
198 |
if ((message.s[i] < 32) || (message.s[i] > 126)) |
199 |
--- a/rblspp.c |
200 |
+++ b/rblspp.c |
201 |
@@ -142,7 +142,7 @@ void rblspp(void) |
202 |
else |
203 |
if (!stralloc_copys(&message,"E553 ")) nomem(); |
204 |
|
205 |
- if (text.len > 200) text.len = 200; |
206 |
+ if (text.len > 500) text.len = 500; |
207 |
if (!stralloc_cat(&message,&text)) nomem(); |
208 |
for (i = 0;i < message.len;++i) |
209 |
if ((message.s[i] < 32) || (message.s[i] > 126)) |
210 |
|
211 |
|
212 |
|
213 |
1.1 sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch |
214 |
|
215 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch?rev=1.1&view=markup |
216 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-no-ipv6.patch?rev=1.1&content-type=text/plain |
217 |
|
218 |
Index: 0.88-protos-no-ipv6.patch |
219 |
=================================================================== |
220 |
rely on standard POSIX headers to fix globs of warnings |
221 |
|
222 |
fixes that overlap with the ipv6 patch |
223 |
|
224 |
--- a/error.h |
225 |
+++ b/error.h |
226 |
@@ -1,7 +1,7 @@ |
227 |
#ifndef ERROR_H |
228 |
#define ERROR_H |
229 |
|
230 |
-extern int errno; |
231 |
+#include <errno.h> |
232 |
|
233 |
extern int error_intr; |
234 |
extern int error_nomem; |
235 |
--- a/dns_random.c |
236 |
+++ b/dns_random.c |
237 |
@@ -1,3 +1,4 @@ |
238 |
+#include <unistd.h> |
239 |
#include "dns.h" |
240 |
#include "taia.h" |
241 |
#include "uint32.h" |
242 |
--- a/dns_rcrw.c |
243 |
+++ b/dns_rcrw.c |
244 |
@@ -1,3 +1,4 @@ |
245 |
+#include <unistd.h> |
246 |
#include "taia.h" |
247 |
#include "env.h" |
248 |
#include "byte.h" |
249 |
--- a/dns_transmit.c |
250 |
+++ b/dns_transmit.c |
251 |
@@ -1,3 +1,4 @@ |
252 |
+#include <sys/socket.h> |
253 |
#include "socket.h" |
254 |
#include "alloc.h" |
255 |
#include "error.h" |
256 |
|
257 |
|
258 |
|
259 |
1.1 sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch |
260 |
|
261 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch?rev=1.1&view=markup |
262 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-ar-ranlib.patch?rev=1.1&content-type=text/plain |
263 |
|
264 |
Index: 0.88-ar-ranlib.patch |
265 |
=================================================================== |
266 |
--- a/Makefile |
267 |
+++ b/Makefile |
268 |
@@ -394,12 +394,14 @@ |
269 |
) > load |
270 |
chmod 755 load |
271 |
|
272 |
+AR ?= ar |
273 |
+RANLIB ?= ranlib |
274 |
makelib: \ |
275 |
warn-auto.sh systype |
276 |
( cat warn-auto.sh; \ |
277 |
echo 'main="$$1"; shift'; \ |
278 |
echo 'rm -f "$$main"'; \ |
279 |
- echo 'ar cr "$$main" $${1+"$$@"}'; \ |
280 |
+ echo '$(AR) cr "$$main" $${1+"$$@"}'; \ |
281 |
case "`cat systype`" in \ |
282 |
sunos-5.*) ;; \ |
283 |
unix_sv*) ;; \ |
284 |
@@ -408,7 +410,7 @@ |
285 |
dgux-*) ;; \ |
286 |
hp-ux-*) ;; \ |
287 |
sco*) ;; \ |
288 |
- *) echo 'ranlib "$$main"' ;; \ |
289 |
+ *) echo '$(RANLIB) "$$main"' ;; \ |
290 |
esac \ |
291 |
) > makelib |
292 |
chmod 755 makelib |
293 |
|
294 |
|
295 |
|
296 |
1.1 sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch |
297 |
|
298 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch?rev=1.1&view=markup |
299 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos-ipv6.patch?rev=1.1&content-type=text/plain |
300 |
|
301 |
Index: 0.88-protos-ipv6.patch |
302 |
=================================================================== |
303 |
rely on standard POSIX headers to fix globs of warnings |
304 |
|
305 |
requires 0.88-protos.patch first |
306 |
|
307 |
--- a/FILES |
308 |
+++ b/FILES |
309 |
@@ -222,7 +222,6 @@ dns_nd6.c |
310 |
dns_sortip6.c |
311 |
fmt_xlong.c |
312 |
ip6_fmt.c |
313 |
-ip6_scan.c |
314 |
scan_0x.c |
315 |
socket_accept6.c |
316 |
socket_bind6.c |
317 |
--- a/TARGETS |
318 |
+++ b/TARGETS |
319 |
@@ -177,7 +177,6 @@ dns_nd6.o |
320 |
dns_sortip6.o |
321 |
fmt_xlong.o |
322 |
ip6_fmt.o |
323 |
-ip6_scan.o |
324 |
scan_0x.o |
325 |
socket_accept6.o |
326 |
socket_bind6.o |
327 |
--- a/ip6.h |
328 |
+++ b/ip6.h |
329 |
@@ -4,10 +4,10 @@ |
330 |
#include "byte.h" |
331 |
|
332 |
extern unsigned int scan_ip6(const char *src,char *ip); |
333 |
-extern unsigned int fmt_ip6(char *dest,const char *ip); |
334 |
+extern unsigned int ip6_fmt(char *dest,char ip[16]); |
335 |
|
336 |
extern unsigned int scan_ip6_flat(const char *src,char *); |
337 |
-extern unsigned int fmt_ip6_flat(char *dest,const char *); |
338 |
+extern unsigned int ip6_fmt_flat(char *dest,char[16]); |
339 |
|
340 |
/* |
341 |
ip6 address syntax: (h = hex digit), no leading '0' required |
342 |
--- a/remoteinfo6.c |
343 |
+++ b/remoteinfo6.c |
344 |
@@ -1,3 +1,4 @@ |
345 |
+#include <unistd.h> |
346 |
#include "fmt.h" |
347 |
#include "buffer.h" |
348 |
#include "socket.h" |
349 |
@@ -5,11 +6,12 @@ |
350 |
#include "iopause.h" |
351 |
#include "timeoutconn.h" |
352 |
#include "remoteinfo.h" |
353 |
+#include "readwrite.h" |
354 |
|
355 |
static struct taia now; |
356 |
static struct taia deadline; |
357 |
|
358 |
-static int mywrite(int fd,char *buf,int len) |
359 |
+static ssize_t mywrite(int fd,char *buf,int len) |
360 |
{ |
361 |
iopause_fd x; |
362 |
|
363 |
@@ -27,7 +29,7 @@ static int mywrite(int fd,char *buf,int len) |
364 |
return write(fd,buf,len); |
365 |
} |
366 |
|
367 |
-static int myread(int fd,char *buf,int len) |
368 |
+static ssize_t myread(int fd,char *buf,int len) |
369 |
{ |
370 |
iopause_fd x; |
371 |
|
372 |
--- a/socket_tcp6.c |
373 |
+++ b/socket_tcp6.c |
374 |
@@ -3,6 +3,7 @@ |
375 |
#include <sys/socket.h> |
376 |
#include <netinet/in.h> |
377 |
#include <errno.h> |
378 |
+#include <unistd.h> |
379 |
#include "ndelay.h" |
380 |
#include "socket.h" |
381 |
#include "haveip6.h" |
382 |
--- a/dns.h |
383 |
+++ b/dns.h |
384 |
@@ -87,6 +87,7 @@ extern int dns_ip4_qualify(stralloc *,stralloc *,const stralloc *); |
385 |
extern int dns_ip6_qualify_rules(stralloc *,stralloc *,const stralloc *,const stralloc *); |
386 |
extern int dns_ip6_qualify(stralloc *,stralloc *,const stralloc *); |
387 |
|
388 |
+extern int dns_name6(stralloc *,char [16]); |
389 |
extern int dns_name6_domain(char *,char *); |
390 |
#define DNS_NAME6_DOMAIN (4*16+11) |
391 |
|
392 |
|
393 |
|
394 |
|
395 |
1.1 sys-apps/ucspi-tcp/files/0.88-protos.patch |
396 |
|
397 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos.patch?rev=1.1&view=markup |
398 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/ucspi-tcp/files/0.88-protos.patch?rev=1.1&content-type=text/plain |
399 |
|
400 |
Index: 0.88-protos.patch |
401 |
=================================================================== |
402 |
rely on standard POSIX headers to fix globs of warnings |
403 |
|
404 |
--- a/tcprulescheck.c |
405 |
+++ b/tcprulescheck.c |
406 |
@@ -1,3 +1,5 @@ |
407 |
+#include <unistd.h> |
408 |
+ |
409 |
#include "byte.h" |
410 |
#include "buffer.h" |
411 |
#include "strerr.h" |
412 |
--- a/buffer.c |
413 |
+++ b/buffer.c |
414 |
@@ -1,6 +1,6 @@ |
415 |
#include "buffer.h" |
416 |
|
417 |
-void buffer_init(buffer *s,int (*op)(),int fd,char *buf,unsigned int len) |
418 |
+void buffer_init(buffer *s,ssize_t (*op)(),int fd,char *buf,unsigned int len) |
419 |
{ |
420 |
s->x = buf; |
421 |
s->fd = fd; |
422 |
--- a/buffer.h |
423 |
+++ b/buffer.h |
424 |
@@ -1,6 +1,8 @@ |
425 |
#ifndef BUFFER_H |
426 |
#define BUFFER_H |
427 |
|
428 |
+#include <sys/types.h> |
429 |
+ |
430 |
typedef struct buffer { |
431 |
char *x; |
432 |
unsigned int p; |
433 |
@@ -13,7 +15,7 @@ typedef struct buffer { |
434 |
#define BUFFER_INSIZE 8192 |
435 |
#define BUFFER_OUTSIZE 8192 |
436 |
|
437 |
-extern void buffer_init(buffer *,int (*)(),int,char *,unsigned int); |
438 |
+extern void buffer_init(buffer *,ssize_t (*)(),int,char *,unsigned int); |
439 |
|
440 |
extern int buffer_flush(buffer *); |
441 |
extern int buffer_put(buffer *,char *,unsigned int); |
442 |
--- a/exit.h |
443 |
+++ b/exit.h |
444 |
@@ -1,6 +1,6 @@ |
445 |
#ifndef EXIT_H |
446 |
#define EXIT_H |
447 |
|
448 |
-extern void _exit(); |
449 |
+#include <unistd.h> |
450 |
|
451 |
#endif |
452 |
--- a/install.c |
453 |
+++ b/install.c |
454 |
@@ -1,3 +1,4 @@ |
455 |
+#include <sys/stat.h> |
456 |
#include "buffer.h" |
457 |
#include "strerr.h" |
458 |
#include "error.h" |
459 |
--- a/readwrite.h |
460 |
+++ b/readwrite.h |
461 |
@@ -1,7 +1,6 @@ |
462 |
#ifndef READWRITE_H |
463 |
#define READWRITE_H |
464 |
|
465 |
-extern int read(); |
466 |
-extern int write(); |
467 |
+#include <unistd.h> |
468 |
|
469 |
#endif |
470 |
|
471 |
--- a/auto-str.c |
472 |
+++ b/auto-str.c |
473 |
@@ -5,6 +5,7 @@ |
474 |
char bspace[256]; |
475 |
buffer b = BUFFER_INIT(write,1,bspace,sizeof bspace); |
476 |
|
477 |
+#define puts _puts |
478 |
void puts(char *s) |
479 |
{ |
480 |
if (buffer_puts(&b,s) == -1) _exit(111); |
481 |
--- a/buffer.h |
482 |
+++ b/buffer.h |
483 |
@@ -8,7 +8,7 @@ typedef struct buffer { |
484 |
unsigned int p; |
485 |
unsigned int n; |
486 |
int fd; |
487 |
- int (*op)(); |
488 |
+ ssize_t (*op)(); |
489 |
} buffer; |
490 |
|
491 |
#define BUFFER_INIT(op,fd,buf,len) { (buf), 0, (len), (fd), (op) } |
492 |
--- a/fd_copy.c |
493 |
+++ b/fd_copy.c |
494 |
@@ -1,4 +1,5 @@ |
495 |
#include <fcntl.h> |
496 |
+#include <unistd.h> |
497 |
#include "fd.h" |
498 |
|
499 |
int fd_copy(int to,int from) |
500 |
--- a/fd_move.c |
501 |
+++ b/fd_move.c |
502 |
@@ -1,3 +1,4 @@ |
503 |
+#include <unistd.h> |
504 |
#include "fd.h" |
505 |
|
506 |
int fd_move(int to,int from) |
507 |
--- a/socket_tcp.c |
508 |
+++ b/socket_tcp.c |
509 |
@@ -1,3 +1,4 @@ |
510 |
+#include <unistd.h> |
511 |
#include <sys/types.h> |
512 |
#include <sys/param.h> |
513 |
#include <sys/socket.h> |
514 |
--- a/chkshsgr.c |
515 |
+++ b/chkshsgr.c |
516 |
@@ -1,8 +1,9 @@ |
517 |
+#include <grp.h> |
518 |
#include "exit.h" |
519 |
|
520 |
main() |
521 |
{ |
522 |
- short x[4]; |
523 |
+ gid_t x[4]; |
524 |
|
525 |
x[0] = x[1] = 0; |
526 |
if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1); |
527 |
--- a/prot.c |
528 |
+++ b/prot.c |
529 |
@@ -1,10 +1,10 @@ |
530 |
#include "hasshsgr.h" |
531 |
#include "prot.h" |
532 |
|
533 |
-int prot_gid(int gid) |
534 |
+int prot_gid(gid_t gid) |
535 |
{ |
536 |
#ifdef HASSHORTSETGROUPS |
537 |
- short x[2]; |
538 |
+ gid_t x[2]; |
539 |
x[0] = gid; x[1] = 73; /* catch errors */ |
540 |
if (setgroups(1,x) == -1) return -1; |
541 |
#else |
542 |
@@ -13,7 +13,7 @@ int prot_gid(int gid) |
543 |
return setgid(gid); /* _should_ be redundant, but on some systems it isn't */ |
544 |
} |
545 |
|
546 |
-int prot_uid(int uid) |
547 |
+int prot_uid(uid_t uid) |
548 |
{ |
549 |
return setuid(uid); |
550 |
} |
551 |
--- a/prot.h |
552 |
+++ b/prot.h |
553 |
@@ -1,7 +1,10 @@ |
554 |
#ifndef PROT_H |
555 |
#define PROT_H |
556 |
|
557 |
-extern int prot_gid(int); |
558 |
-extern int prot_uid(int); |
559 |
+#include <unistd.h> |
560 |
+#include <grp.h> |
561 |
+ |
562 |
+extern int prot_gid(gid_t); |
563 |
+extern int prot_uid(uid_t); |
564 |
|
565 |
#endif |
566 |
--- a/fixcrio.c |
567 |
+++ b/fixcrio.c |
568 |
@@ -6,6 +6,7 @@ |
569 |
#include "exit.h" |
570 |
#include "iopause.h" |
571 |
#include "pathexec.h" |
572 |
+#include "fd.h" |
573 |
|
574 |
#define FATAL "fixcrio: fatal: " |
575 |
|
576 |
--- a/hier.c |
577 |
+++ b/hier.c |
578 |
@@ -1,5 +1,9 @@ |
579 |
#include "auto_home.h" |
580 |
|
581 |
+extern void h(char *, int, int, int); |
582 |
+extern void d(char *, char *, int, int, int); |
583 |
+extern void c(char *, char *, char *, int, int, int); |
584 |
+ |
585 |
void hier() |
586 |
{ |
587 |
h(auto_home,-1,-1,02755); |
588 |
--- a/mconnect-io.c |
589 |
+++ b/mconnect-io.c |
590 |
@@ -1,3 +1,4 @@ |
591 |
+#include <signal.h> |
592 |
#include "sig.h" |
593 |
#include "wait.h" |
594 |
#include "fork.h" |
595 |
@@ -12,7 +13,7 @@ buffer bout; |
596 |
char inbuf[512]; |
597 |
buffer bin; |
598 |
|
599 |
-int myread(int fd,char *buf,int len) |
600 |
+ssize_t myread(int fd,char *buf,int len) |
601 |
{ |
602 |
buffer_flush(&bout); |
603 |
return read(fd,buf,len); |
604 |
--- a/tcprules.c |
605 |
+++ b/tcprules.c |
606 |
@@ -1,3 +1,4 @@ |
607 |
+#include <stdio.h> |
608 |
#include "strerr.h" |
609 |
#include "stralloc.h" |
610 |
#include "getln.h" |
611 |
@@ -6,6 +7,8 @@ |
612 |
#include "fmt.h" |
613 |
#include "byte.h" |
614 |
#include "cdb_make.h" |
615 |
+#include "open.h" |
616 |
+#include "scan.h" |
617 |
|
618 |
#define FATAL "tcprules: fatal: " |
619 |
|
620 |
--- a/pathexec_run.c |
621 |
+++ b/pathexec_run.c |
622 |
@@ -1,3 +1,4 @@ |
623 |
+#include <unistd.h> |
624 |
#include "error.h" |
625 |
#include "stralloc.h" |
626 |
#include "str.h" |
627 |
--- a/recordio.c |
628 |
+++ b/recordio.c |
629 |
@@ -8,6 +8,7 @@ |
630 |
#include "fmt.h" |
631 |
#include "iopause.h" |
632 |
#include "pathexec.h" |
633 |
+#include "fd.h" |
634 |
|
635 |
#define FATAL "recordio: fatal: " |
636 |
|
637 |
--- a/seek_set.c |
638 |
+++ b/seek_set.c |
639 |
@@ -1,7 +1,6 @@ |
640 |
+#include <unistd.h> |
641 |
#include <sys/types.h> |
642 |
#include "seek.h" |
643 |
|
644 |
-#define SET 0 /* sigh */ |
645 |
- |
646 |
int seek_set(int fd,seek_pos pos) |
647 |
-{ if (lseek(fd,(off_t) pos,SET) == -1) return -1; return 0; } |
648 |
+{ if (lseek(fd,(off_t) pos,SEEK_SET) == -1) return -1; return 0; } |
649 |
--- a/socket_udp.c |
650 |
+++ b/socket_udp.c |
651 |
@@ -2,6 +2,7 @@ |
652 |
#include <sys/param.h> |
653 |
#include <sys/socket.h> |
654 |
#include <netinet/in.h> |
655 |
+#include <unistd.h> |
656 |
#include "ndelay.h" |
657 |
#include "socket.h" |
658 |
|
659 |
--- a/tcprulescheck.c |
660 |
+++ b/tcprulescheck.c |
661 |
@@ -5,6 +5,7 @@ |
662 |
#include "strerr.h" |
663 |
#include "env.h" |
664 |
#include "rules.h" |
665 |
+#include "open.h" |
666 |
|
667 |
void found(char *data,unsigned int datalen) |
668 |
{ |
669 |
|
670 |
the prototypes are added near the top to avoid conflicts w/ipv6 patch |
671 |
|
672 |
--- a/socket.h |
673 |
+++ b/socket.h |
674 |
@@ -3,6 +3,9 @@ |
675 |
#ifndef SOCKET_H |
676 |
#define SOCKET_H |
677 |
|
678 |
+extern int socket_tcpnodelay(int); |
679 |
+extern int socket_ipoptionskill(int); |
680 |
+ |
681 |
#include "uint16.h" |
682 |
|
683 |
extern int socket_tcp(void); |
684 |
--- a/remoteinfo.c |
685 |
+++ b/remoteinfo.c |
686 |
@@ -1,3 +1,4 @@ |
687 |
+#include <unistd.h> |
688 |
#include "fmt.h" |
689 |
#include "buffer.h" |
690 |
#include "socket.h" |
691 |
@@ -5,11 +6,12 @@ |
692 |
#include "iopause.h" |
693 |
#include "timeoutconn.h" |
694 |
#include "remoteinfo.h" |
695 |
+#include "readwrite.h" |
696 |
|
697 |
static struct taia now; |
698 |
static struct taia deadline; |
699 |
|
700 |
-static int mywrite(int fd,char *buf,int len) |
701 |
+static ssize_t mywrite(int fd,char *buf,int len) |
702 |
{ |
703 |
iopause_fd x; |
704 |
|
705 |
@@ -27,7 +29,7 @@ static int mywrite(int fd,char *buf,int len) |
706 |
return write(fd,buf,len); |
707 |
} |
708 |
|
709 |
-static int myread(int fd,char *buf,int len) |
710 |
+static ssize_t myread(int fd,char *buf,int len) |
711 |
{ |
712 |
iopause_fd x; |
713 |
|
714 |
--- a/alloc.c |
715 |
+++ b/alloc.c |
716 |
@@ -1,7 +1,5 @@ |
717 |
#include "alloc.h" |
718 |
#include "error.h" |
719 |
-extern char *malloc(); |
720 |
-extern void free(); |
721 |
|
722 |
#define ALIGNMENT 16 /* XXX: assuming that this alignment is enough */ |
723 |
#define SPACE 2048 /* must be multiple of ALIGNMENT */ |
724 |
--- a/alloc.h |
725 |
+++ b/alloc.h |
726 |
@@ -1,8 +1,10 @@ |
727 |
#ifndef ALLOC_H |
728 |
#define ALLOC_H |
729 |
|
730 |
-extern /*@null@*//*@out@*/char *alloc(); |
731 |
-extern void alloc_free(); |
732 |
+#include <stdlib.h> |
733 |
+ |
734 |
+extern /*@null@*//*@out@*/char *alloc(unsigned int); |
735 |
+extern void alloc_free(char *); |
736 |
extern int alloc_re(); |
737 |
|
738 |
#endif |
739 |
--- a/buffer_0.c |
740 |
+++ b/buffer_0.c |
741 |
@@ -1,7 +1,7 @@ |
742 |
#include "readwrite.h" |
743 |
#include "buffer.h" |
744 |
|
745 |
-int buffer_0_read(fd,buf,len) int fd; char *buf; int len; |
746 |
+ssize_t buffer_0_read(fd,buf,len) int fd; char *buf; int len; |
747 |
{ |
748 |
if (buffer_flush(buffer_1) == -1) return -1; |
749 |
return read(fd,buf,len); |
750 |
--- a/buffer_get.c |
751 |
+++ b/buffer_get.c |
752 |
@@ -2,7 +2,7 @@ |
753 |
#include "byte.h" |
754 |
#include "error.h" |
755 |
|
756 |
-static int oneread(int (*op)(),int fd,char *buf,unsigned int len) |
757 |
+static int oneread(ssize_t (*op)(),int fd,char *buf,unsigned int len) |
758 |
{ |
759 |
int r; |
760 |
|
761 |
--- a/buffer_put.c |
762 |
+++ b/buffer_put.c |
763 |
@@ -3,7 +3,7 @@ |
764 |
#include "byte.h" |
765 |
#include "error.h" |
766 |
|
767 |
-static int allwrite(int (*op)(),int fd,char *buf,unsigned int len) |
768 |
+static int allwrite(ssize_t (*op)(),int fd,char *buf,unsigned int len) |
769 |
{ |
770 |
int w; |
771 |
|
772 |
--- a/case.h |
773 |
+++ b/case.h |
774 |
@@ -4,7 +4,7 @@ |
775 |
extern void case_lowers(char *); |
776 |
extern void case_lowerb(char *,unsigned int); |
777 |
extern int case_diffs(char *,char *); |
778 |
-extern int case_diffb(char *,unsigned int,char *); |
779 |
+extern int case_diffb(const char *,unsigned int,const char *); |
780 |
extern int case_starts(char *,char *); |
781 |
extern int case_startb(char *,unsigned int,char *); |
782 |
|
783 |
--- a/case_diffb.c |
784 |
+++ b/case_diffb.c |
785 |
@@ -1,6 +1,6 @@ |
786 |
#include "case.h" |
787 |
|
788 |
-int case_diffb(register char *s,register unsigned int len,register char *t) |
789 |
+int case_diffb(register const char *s,register unsigned int len,const register char *t) |
790 |
{ |
791 |
register unsigned char x; |
792 |
register unsigned char y; |
793 |
--- a/open.h |
794 |
+++ b/open.h |
795 |
@@ -1,10 +1,10 @@ |
796 |
#ifndef OPEN_H |
797 |
#define OPEN_H |
798 |
|
799 |
-extern int open_read(char *); |
800 |
-extern int open_excl(char *); |
801 |
-extern int open_append(char *); |
802 |
-extern int open_trunc(char *); |
803 |
-extern int open_write(char *); |
804 |
+extern int open_read(const char *); |
805 |
+extern int open_excl(const char *); |
806 |
+extern int open_append(const char *); |
807 |
+extern int open_trunc(const char *); |
808 |
+extern int open_write(const char *); |
809 |
|
810 |
#endif |
811 |
--- a/open_read.c |
812 |
+++ b/open_read.c |
813 |
@@ -2,5 +2,5 @@ |
814 |
#include <fcntl.h> |
815 |
#include "open.h" |
816 |
|
817 |
-int open_read(char *fn) |
818 |
+int open_read(const char *fn) |
819 |
{ return open(fn,O_RDONLY | O_NDELAY); } |
820 |
--- a/open_trunc.c |
821 |
+++ b/open_trunc.c |
822 |
@@ -2,5 +2,5 @@ |
823 |
#include <fcntl.h> |
824 |
#include "open.h" |
825 |
|
826 |
-int open_trunc(char *fn) |
827 |
+int open_trunc(const char *fn) |
828 |
{ return open(fn,O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT,0644); } |
829 |
--- a/open_write.c |
830 |
+++ b/open_write.c |
831 |
@@ -2,5 +2,5 @@ |
832 |
#include <fcntl.h> |
833 |
#include "open.h" |
834 |
|
835 |
-int open_write(char *fn) |
836 |
+int open_write(const char *fn) |
837 |
{ return open(fn,O_WRONLY | O_NDELAY); } |
838 |
--- a/openreadclose.c |
839 |
+++ b/openreadclose.c |
840 |
@@ -3,7 +3,7 @@ |
841 |
#include "readclose.h" |
842 |
#include "openreadclose.h" |
843 |
|
844 |
-int openreadclose(char *fn,stralloc *sa,unsigned int bufsize) |
845 |
+int openreadclose(const char *fn,stralloc *sa,unsigned int bufsize) |
846 |
{ |
847 |
int fd; |
848 |
fd = open_read(fn); |
849 |
--- a/openreadclose.h |
850 |
+++ b/openreadclose.h |
851 |
@@ -3,6 +3,6 @@ |
852 |
|
853 |
#include "stralloc.h" |
854 |
|
855 |
-extern int openreadclose(char *,stralloc *,unsigned int); |
856 |
+extern int openreadclose(const char *,stralloc *,unsigned int); |
857 |
|
858 |
#endif |
859 |
--- a/stralloc.h |
860 |
+++ b/stralloc.h |
861 |
@@ -7,7 +7,7 @@ GEN_ALLOC_typedef(stralloc,char,s,len,a) |
862 |
|
863 |
extern int stralloc_ready(stralloc *,unsigned int); |
864 |
extern int stralloc_readyplus(stralloc *,unsigned int); |
865 |
-extern int stralloc_copy(stralloc *,stralloc *); |
866 |
+extern int stralloc_copy(stralloc *,const stralloc *); |
867 |
extern int stralloc_cat(stralloc *,stralloc *); |
868 |
extern int stralloc_copys(stralloc *,const char *); |
869 |
extern int stralloc_cats(stralloc *,const char *); |
870 |
--- a/stralloc_copy.c |
871 |
+++ b/stralloc_copy.c |
872 |
@@ -1,7 +1,7 @@ |
873 |
#include "byte.h" |
874 |
#include "stralloc.h" |
875 |
|
876 |
-int stralloc_copy(stralloc *sato,stralloc *safrom) |
877 |
+int stralloc_copy(stralloc *sato,const stralloc *safrom) |
878 |
{ |
879 |
return stralloc_copyb(sato,safrom->s,safrom->len); |
880 |
} |
881 |
--- a/taia.h |
882 |
+++ b/taia.h |
883 |
@@ -19,7 +19,7 @@ extern double taia_frac(struct taia *); |
884 |
extern void taia_add(struct taia *,struct taia *,struct taia *); |
885 |
extern void taia_sub(struct taia *,struct taia *,struct taia *); |
886 |
extern void taia_half(struct taia *,struct taia *); |
887 |
-extern int taia_less(struct taia *,struct taia *); |
888 |
+extern int taia_less(const struct taia *,const struct taia *); |
889 |
|
890 |
#define TAIA_PACK 16 |
891 |
extern void taia_pack(char *,struct taia *); |
892 |
--- a/taia_less.c |
893 |
+++ b/taia_less.c |
894 |
@@ -2,7 +2,7 @@ |
895 |
|
896 |
/* XXX: breaks tai encapsulation */ |
897 |
|
898 |
-int taia_less(struct taia *t,struct taia *u) |
899 |
+int taia_less(const struct taia *t,const struct taia *u) |
900 |
{ |
901 |
if (t->sec.x < u->sec.x) return 1; |
902 |
if (t->sec.x > u->sec.x) return 0; |
903 |
--- a/uint32.h1 |
904 |
+++ b/uint32.h1 |
905 |
@@ -5,7 +5,7 @@ typedef unsigned int uint32; |
906 |
|
907 |
extern void uint32_pack(char *,uint32); |
908 |
extern void uint32_pack_big(char *,uint32); |
909 |
-extern void uint32_unpack(char *,uint32 *); |
910 |
-extern void uint32_unpack_big(char *,uint32 *); |
911 |
+extern void uint32_unpack(const char *,uint32 *); |
912 |
+extern void uint32_unpack_big(const char *,uint32 *); |
913 |
|
914 |
#endif |
915 |
--- a/uint32.h2 |
916 |
+++ b/uint32.h2 |
917 |
@@ -5,7 +5,7 @@ typedef unsigned long uint32; |
918 |
|
919 |
extern void uint32_pack(char *,uint32); |
920 |
extern void uint32_pack_big(char *,uint32); |
921 |
-extern void uint32_unpack(char *,uint32 *); |
922 |
-extern void uint32_unpack_big(char *,uint32 *); |
923 |
+extern void uint32_unpack(const char *,uint32 *); |
924 |
+extern void uint32_unpack_big(const char *,uint32 *); |
925 |
|
926 |
#endif |
927 |
--- a/uint32_unpack.c |
928 |
+++ b/uint32_unpack.c |
929 |
@@ -1,6 +1,6 @@ |
930 |
#include "uint32.h" |
931 |
|
932 |
-void uint32_unpack(char s[4],uint32 *u) |
933 |
+void uint32_unpack(const char s[4],uint32 *u) |
934 |
{ |
935 |
uint32 result; |
936 |
|
937 |
@@ -15,7 +15,7 @@ void uint32_unpack(char s[4],uint32 *u) |
938 |
*u = result; |
939 |
} |
940 |
|
941 |
-void uint32_unpack_big(char s[4],uint32 *u) |
942 |
+void uint32_unpack_big(const char s[4],uint32 *u) |
943 |
{ |
944 |
uint32 result; |