1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00
freebsd-ports/textproc/2bsd-diff/files/patch-diffreg.c
Norikatsu Shigemura 52bd9c4f01 Add 2bsd-diff 2.11, 2.11BSD diff utility. It can process large
files with less memory.  GNU Diff often can not work with files
larger than 33% of datasize (from limit) due to memory exhaustion.

PR:		ports/50097
Submitted by:	risner@stdio.com
2003-03-23 07:24:20 +00:00

22 lines
562 B
C

--- diffreg.c.orig Tue Jan 11 14:39:33 1994
+++ diffreg.c Wed Mar 19 01:38:48 2003
@@ -270,12 +270,12 @@
char buf[BUFSIZ];
register int i, f;
- signal(SIGHUP,done);
- signal(SIGINT,done);
- signal(SIGPIPE,done);
- signal(SIGTERM,done);
- tempfile = mktemp("/tmp/dXXXXX");
- f = creat(tempfile,0600);
+ signal(SIGHUP, (sig_t) done);
+ signal(SIGINT, (sig_t) done);
+ signal(SIGPIPE, (sig_t) done);
+ signal(SIGTERM, (sig_t) done);
+ strcpy(tempfile, "/tmp/dXXXXX");
+ f = mkstemp(tempfile);
if (f < 0) {
fprintf(stderr, "diff: ");
perror(tempfile);