mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-04 06:15:24 +00:00
52bd9c4f01
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
22 lines
562 B
C
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);
|