openbsd-ports/benchmarks/bytebench/patches/patch-ac
marc 50f1458a01 remove patch residue before install so uninstall is clean.
Minor tweaks to DESCR.  Replace gets with fgets.
Get rid of all compile warnings.
1998-02-27 04:06:11 +00:00

66 lines
1.4 KiB
Plaintext

--- src/big.c.orig Wed Feb 5 02:08:47 1992
+++ src/big.c Thu Feb 26 19:55:18 1998
@@ -81,10 +81,10 @@
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 @@
}
-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 @@
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];