mirror of
https://git.freebsd.org/ports.git
synced 2025-05-28 17:06:32 -04:00
On FreeBSD 13 - current, the build failed with: cc: error: unknown argument: '-i' PR: 234362 Submitted by: risner@stdio.com (maintainer)
63 lines
869 B
C
63 lines
869 B
C
--- diff.c.orig 1991-11-12 20:31:26 UTC
|
|
+++ diff.c
|
|
@@ -11,7 +11,7 @@ char diff[] = DIFF;
|
|
char diffh[] = DIFFH;
|
|
char pr[] = PR;
|
|
|
|
-main(argc, argv)
|
|
+int main(argc, argv)
|
|
int argc;
|
|
char **argv;
|
|
{
|
|
@@ -162,23 +162,24 @@ savestr(cp)
|
|
return (dp);
|
|
}
|
|
|
|
-min(a,b)
|
|
+int min(a,b)
|
|
int a,b;
|
|
{
|
|
|
|
return (a < b ? a : b);
|
|
}
|
|
|
|
-max(a,b)
|
|
+int max(a,b)
|
|
int a,b;
|
|
{
|
|
|
|
return (a > b ? a : b);
|
|
}
|
|
|
|
+sig_t
|
|
done()
|
|
{
|
|
- if (tempfile)
|
|
+ if (tempfile[0])
|
|
unlink(tempfile);
|
|
exit(status);
|
|
}
|
|
@@ -191,6 +192,7 @@ talloc(n)
|
|
if ((p = malloc((unsigned)n)) != NULL)
|
|
return(p);
|
|
noroom();
|
|
+ return NULL;
|
|
}
|
|
|
|
char *
|
|
@@ -198,14 +200,13 @@ ralloc(p,n)
|
|
char *p;
|
|
{
|
|
register char *q;
|
|
- char *realloc();
|
|
|
|
if ((q = realloc(p, (unsigned)n)) == NULL)
|
|
noroom();
|
|
return(q);
|
|
}
|
|
|
|
-noroom()
|
|
+void noroom()
|
|
{
|
|
fprintf(stderr, "diff: files too big, try -h\n");
|
|
done();
|