$OpenBSD: patch-src_big_c,v 1.1 2002/07/17 21:57:21 lebel Exp $
--- src/big.c.orig	Wed Feb  5 05:08:47 1992
+++ src/big.c	Wed Jul 17 17:36:08 2002
@@ -81,10 +81,10 @@ char	*argv[];
     int		nch;		/* # characters to write */
     int		written;	/* # characters actully written */
     char	logname[15];	/* name of the log file(s) */
-    int		onalarm();
-    int		pipeerr();
-    int		wrapup();
-    int		grunt();
+    void	onalarm( int );
+    void	pipeerr( int );
+    int		wrapup( char * );
+    void	grunt( int );
     int		pvec[2];	/* for pipes */
     char	*p;
     char	*prog;		/* my name */
@@ -383,22 +383,28 @@ bepatient:
 
 }
 
-onalarm()
+void
+onalarm( int sigraised )
 {
+    (void) sigraised;
     thres += est_rate;
     signal(SIGALRM, onalarm);
     alarm(GRANULE);
 }
 
-grunt()
+void
+grunt( int sigraised )
 {
+    (void) sigraised;
     /* timeout after label "bepatient" in main */
     exit_status = 4;
     wrapup("Timed out waiting for jobs to finish ...");
 }
 
-pipeerr()
+void
+pipeerr( int sigraised )
 {
+	(void) sigraised;
 	sigpipe++;
 }
 
@@ -434,9 +440,13 @@ getwork()
     char		c;
     char		*malloc(), *realloc();
 
-    while (gets(line) != NULL) {
+    while (fgets(line, sizeof line, stdin) != NULL) {
+	lp = strchr( line, '\n' );
+	if ( lp ) {
+	    *lp = 0;
+	}
 	if (nwork >= MAXWORK) {
-	    fprintf(stderr, stderr, "Too many jobs specified, .. increase MAXWORK\n");
+	    fprintf(stderr, "Too many jobs specified, .. increase MAXWORK\n");
 	    exit(4);
 	}
 	w = &work[nwork];
