Source
xxxxxxxxxx
--- buffer.c.org 2010-08-18 14:37:21.000000000 +0200
+++ buffer.c 2010-08-18 15:02:36.000000000 +0200
@@ -109,6 +109,9 @@
* Initial revision
*
*/
+
+#include <stdlib.h>
+#include <strings.h>
#include <unistd.h>
#include <stdio.h>
#include <signal.h>
@@ -126,10 +129,6 @@
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 $";
#endif
-#ifndef __alpha
-extern char *shmat();
-#endif /* __alpha */
-
/* General macros */
#define TRUE 1
#define FALSE 0
@@ -507,9 +506,9 @@
get_buffer();
if( debug )
- fprintf( stderr, "%s pbuffer is 0x%08x, buffer_size is %d [%d x %d]\n",
+ fprintf( stderr, "%s pbuffer is 0x%p, buffer_size is %d [%d x %d]\n",
proc_string,
- (char *)pbuffer, buffer_size, blocks, blocksize );
+ (void *)pbuffer, buffer_size, blocks, blocksize );
#ifdef SYS5
memset( (char *)pbuffer, '\0', buffer_size );
@@ -648,7 +647,7 @@
int
fill_block()
{
- int bytes;
+ int bytes = 0;
char *start;
int toread;
static char eof_reached = 0;
--- sem.c.org 2010-08-18 15:03:14.000000000 +0200
+++ sem.c 2010-08-18 15:04:15.000000000 +0200
@@ -27,6 +27,7 @@
* semaphores */
#include <stdio.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ipc.h>
@@ -95,7 +96,7 @@
return sem;
}
-static
+static void
do_sem( sem_id, pbuf, err )
int sem_id;
struct sembuf *pbuf;