1 | --- buffer.c.org 2010-08-18 14:37:21.000000000 +0200 |
---|
2 | +++ buffer.c 2010-08-18 15:02:36.000000000 +0200 |
---|
3 | @@ -109,6 +109,9 @@ |
---|
4 | * Initial revision |
---|
5 | * |
---|
6 | */ |
---|
7 | + |
---|
8 | +#include <stdlib.h> |
---|
9 | +#include <strings.h> |
---|
10 | #include <unistd.h> |
---|
11 | #include <stdio.h> |
---|
12 | #include <signal.h> |
---|
13 | @@ -126,10 +129,6 @@ |
---|
14 | static char *rcsid = "$Header: /a/swan/home/swan/staff/csg/lmjm/src/buffer/RCS/buffer.c,v 1.19 1995/08/24 17:46:28 lmjm Exp lmjm $"; |
---|
15 | #endif |
---|
16 | |
---|
17 | -#ifndef __alpha |
---|
18 | -extern char *shmat(); |
---|
19 | -#endif /* __alpha */ |
---|
20 | - |
---|
21 | /* General macros */ |
---|
22 | #define TRUE 1 |
---|
23 | #define FALSE 0 |
---|
24 | @@ -507,9 +506,9 @@ |
---|
25 | get_buffer(); |
---|
26 | |
---|
27 | if( debug ) |
---|
28 | - fprintf( stderr, "%s pbuffer is 0x%08x, buffer_size is %d [%d x %d]\n", |
---|
29 | + fprintf( stderr, "%s pbuffer is 0x%p, buffer_size is %d [%d x %d]\n", |
---|
30 | proc_string, |
---|
31 | - (char *)pbuffer, buffer_size, blocks, blocksize ); |
---|
32 | + (void *)pbuffer, buffer_size, blocks, blocksize ); |
---|
33 | |
---|
34 | #ifdef SYS5 |
---|
35 | memset( (char *)pbuffer, '\0', buffer_size ); |
---|
36 | @@ -648,7 +647,7 @@ |
---|
37 | int |
---|
38 | fill_block() |
---|
39 | { |
---|
40 | - int bytes; |
---|
41 | + int bytes = 0; |
---|
42 | char *start; |
---|
43 | int toread; |
---|
44 | static char eof_reached = 0; |
---|
45 | --- sem.c.org 2010-08-18 15:03:14.000000000 +0200 |
---|
46 | +++ sem.c 2010-08-18 15:04:15.000000000 +0200 |
---|
47 | @@ -27,6 +27,7 @@ |
---|
48 | * semaphores */ |
---|
49 | |
---|
50 | #include <stdio.h> |
---|
51 | +#include <unistd.h> |
---|
52 | #include <sys/types.h> |
---|
53 | #include <sys/stat.h> |
---|
54 | #include <sys/ipc.h> |
---|
55 | @@ -95,7 +96,7 @@ |
---|
56 | return sem; |
---|
57 | } |
---|
58 | |
---|
59 | -static |
---|
60 | +static void |
---|
61 | do_sem( sem_id, pbuf, err ) |
---|
62 | int sem_id; |
---|
63 | struct sembuf *pbuf; |
---|