From risner@heathers.stdio.com  Tue Mar 18 07:20:58 2003
Return-Path: <risner@heathers.stdio.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id DC31A37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Mar 2003 07:20:58 -0800 (PST)
Received: from heathers.stdio.com (heathers.stdio.com [199.89.192.5])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 99A0843FAF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 18 Mar 2003 07:20:56 -0800 (PST)
	(envelope-from risner@heathers.stdio.com)
Received: (from risner@localhost)
	by heathers.stdio.com (8.11.6/8.11.6) id h2IFKtg19768;
	Tue, 18 Mar 2003 10:20:55 -0500 (EST)
	(envelope-from risner)
Message-Id: <200303181520.h2IFKtg19768@heathers.stdio.com>
Date: Tue, 18 Mar 2003 10:20:55 -0500 (EST)
From: risner@stdio.com
Reply-To: risner@stdio.com
To: FreeBSD-gnats-submit@freebsd.org
Cc: risner@stdio.com
Subject: New port: 2.11BSD version of diff/diffh, can work w/files that GNU Diff failes "memory exhausted"
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         50097
>Category:       ports
>Synopsis:       New port: 2.11BSD version of diff/diffh, can work w/files that GNU Diff failes "memory exhausted"
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    nork
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 18 07:30:07 PST 2003
>Closed-Date:    Sat Mar 22 23:25:16 PST 2003
>Last-Modified:  Sat Mar 22 23:25:16 PST 2003
>Originator:     risner@stdio.com
>Release:        FreeBSD 5.0-RELEASE i386
>Organization:
OpenWorld, Inc.
>Environment:
System: FreeBSD akira.stdio.com 5.0-RELEASE FreeBSD 5.0-RELEASE #0: Thu Jan 16 22:16:53 GMT 2003 root@hollin.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC i386

	
>Description:
	Diff program from 2.11BSD unix ported to FreeBSD.  This
	program 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.  If you work with
	files that large or larger, you will need this version of
	diff.
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	textproc/2bsd-diff
#	textproc/2bsd-diff/Makefile
#	textproc/2bsd-diff/distinfo
#	textproc/2bsd-diff/scripts
#	textproc/2bsd-diff/scripts/post-extract
#	textproc/2bsd-diff/files
#	textproc/2bsd-diff/files/patch-aa
#	textproc/2bsd-diff/files/patch-ab
#	textproc/2bsd-diff/pkg-plist
#	textproc/2bsd-diff/pkg-descr
#
echo c - textproc/2bsd-diff
mkdir -p textproc/2bsd-diff > /dev/null 2>&1
echo x - textproc/2bsd-diff/Makefile
sed 's/^X//' >textproc/2bsd-diff/Makefile << 'END-of-textproc/2bsd-diff/Makefile'
X# New ports collection makefile for:    2bsd-diff
X# Date created:         Mon Mar 17 20:54:03 EST 2003
X# Whom:                 risner@stdio.com
X#
X# $FreeBSD: ports/textproc/2bsd-diff/Makefile,v 1.10 2003/02/22 13:24:09 risner Exp $
X#
X
XPORTNAME=	diff
XPORTVERSION=	2.11
XPORTREVISION=	0
XCATEGORIES=	textproc
XMASTER_SITES=	http://www.tribug.org/pub/tuhs/PDP-11/Distributions/ucb/2.11BSD/
XPKGNAMEPREFIX=	2bsd-
XDISTNAME=	file8
X
XMAINTAINER=     risner@stdio.com
XCOMMENT=	2.11BSD diff utility
X
XEXTRACT_AFTER_ARGS=	| ${TAR} -xf - bin/diff man/man1/diff.1
XWRKSRC=			${WRKDIR}/bin/diff
X
Xdo-install:
X	@${INSTALL_PROGRAM} ${WRKSRC}/diff ${PREFIX}/bin
X	@${INSTALL_PROGRAM} ${WRKSRC}/diffh ${PREFIX}/libexec
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	@${INSTALL_MAN} ${WRKSRC}/diff.1 ${PREFIX}/man/man1
X.endif
X
X.include <bsd.port.mk>
END-of-textproc/2bsd-diff/Makefile
echo x - textproc/2bsd-diff/distinfo
sed 's/^X//' >textproc/2bsd-diff/distinfo << 'END-of-textproc/2bsd-diff/distinfo'
XMD5 (file8.tar.gz) = 77397e6d554361c127592b1fea2d776f
END-of-textproc/2bsd-diff/distinfo
echo c - textproc/2bsd-diff/scripts
mkdir -p textproc/2bsd-diff/scripts > /dev/null 2>&1
echo x - textproc/2bsd-diff/scripts/post-extract
sed 's/^X//' >textproc/2bsd-diff/scripts/post-extract << 'END-of-textproc/2bsd-diff/scripts/post-extract'
X#!/bin/sh
X
Xcp ${WRKDIR}/man/man1/diff.1 ${WRKSRC}/diff.1
END-of-textproc/2bsd-diff/scripts/post-extract
echo c - textproc/2bsd-diff/files
mkdir -p textproc/2bsd-diff/files > /dev/null 2>&1
echo x - textproc/2bsd-diff/files/patch-aa
sed 's/^X//' >textproc/2bsd-diff/files/patch-aa << 'END-of-textproc/2bsd-diff/files/patch-aa'
Xdiff -c -r Makefile Makefile
X*** Makefile	Tue Oct 22 00:29:46 1996
X--- Makefile	Mon Mar 17 21:54:08 2003
X***************
X*** 1,7 ****
X  #	@(#)Makefile	4.1.1	1996/10/21
X  #
X! DIFF=	/bin/diff
X! DIFFH=	/usr/libexec/diffh
X  PR=	/bin/pr
X  CFLAGS=	-O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
X  SEPFLAG=-i
X--- 1,7 ----
X  #	@(#)Makefile	4.1.1	1996/10/21
X  #
X! DIFF=	/usr/local/bin/diff
X! DIFFH=	/usr/local/libexec/diffh
X  PR=	/bin/pr
X  CFLAGS=	-O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
X  SEPFLAG=-i
X***************
X*** 5,11 ****
X  PR=	/bin/pr
X  CFLAGS=	-O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
X  SEPFLAG=-i
X! DESTDIR=
X  
X  SRCS=	diff.c diffdir.c diffreg.c
X  HDRS=	diff.h
X--- 5,11 ----
X  PR=	/bin/pr
X  CFLAGS=	-O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
X  SEPFLAG=-i
X! DESTDIR=/usr/local
X  
X  SRCS=	diff.c diffdir.c diffreg.c
X  HDRS=	diff.h
X***************
X*** 24,27 ****
X  
X  install: all
X  	install -s diff ${DESTDIR}/bin/diff
X! 	install -s diffh ${DESTDIR}/usr/libexec/diffh
X--- 24,27 ----
X  
X  install: all
X  	install -s diff ${DESTDIR}/bin/diff
X! 	install -s diffh ${DESTDIR}/libexec/diffh
Xdiff -c -r diff.c diff.c
X*** diff.c	Tue Nov 12 15:31:26 1991
X--- diff.c	Mon Mar 17 21:54:08 2003
X***************
X*** 176,184 ****
X  	return (a > b ? a : b);
X  }
X  
X  done()
X  {
X! 	if (tempfile)
X  		unlink(tempfile);
X  	exit(status);
X  }
X--- 176,185 ----
X  	return (a > b ? a : b);
X  }
X  
X+ sig_t
X  done()
X  {
X! 	if (tempfile[0])
X  		unlink(tempfile);
X  	exit(status);
X  }
X***************
X*** 198,204 ****
X  char *p;
X  {
X  	register char *q;
X- 	char *realloc();
X  
X  	if ((q = realloc(p, (unsigned)n)) == NULL)
X  		noroom();
X--- 199,204 ----
Xdiff -c -r diff.h diff.h
X*** diff.h	Wed Aug 28 17:44:35 1985
X--- diff.h	Mon Mar 17 21:54:08 2003
X***************
X*** 5,14 ****
X   */
X  
X  #include <stdio.h>
X  #include <ctype.h>
X  #include <sys/param.h>
X  #include <sys/stat.h>
X! #include <sys/dir.h>
X  #include <signal.h>
X  
X  /*
X--- 5,15 ----
X   */
X  
X  #include <stdio.h>
X+ #include <stdlib.h>
X  #include <ctype.h>
X  #include <sys/param.h>
X  #include <sys/stat.h>
X! #include <dirent.h>
X  #include <signal.h>
X  
X  /*
X***************
X*** 61,67 ****
X   */
X  int	status;
X  int	anychange;
X! char	*tempfile;		/* used when comparing against std input */
X  
X  /*
X   * Variables for diffdir.
X--- 62,68 ----
X   */
X  int	status;
X  int	anychange;
X! char	tempfile[128];		/* used when comparing against std input */
X  
X  /*
X   * Variables for diffdir.
X***************
X*** 77,85 ****
X  char	*file1, *file2, *efile1, *efile2;
X  struct	stat stb1, stb2;
X  
X! char	*malloc(), *talloc(), *ralloc();
X  char	*savestr(), *splice(), *splicen();
X! char	*mktemp(), *copytemp(), *rindex();
X! int	done();
X  
X  extern	char diffh[], diff[], pr[];
X--- 78,86 ----
X  char	*file1, *file2, *efile1, *efile2;
X  struct	stat stb1, stb2;
X  
X! char	*talloc(), *ralloc();
X  char	*savestr(), *splice(), *splicen();
X! char	*copytemp();
X! sig_t	done();
X  
X  extern	char diffh[], diff[], pr[];
Xdiff -c -r diffdir.c diffdir.c
X*** diffdir.c	Tue Nov 12 15:31:29 1991
X--- diffdir.c	Mon Mar 17 21:54:08 2003
X***************
X*** 172,178 ****
X  	char *cp;
X  {
X  	register struct dir *dp = 0, *ep;
X! 	register struct direct *rp;
X  	register int nitems, n;
X  	DIR *dirp;
X  
X--- 172,178 ----
X  	char *cp;
X  {
X  	register struct dir *dp = 0, *ep;
X! 	register struct dirent *rp;
X  	register int nitems, n;
X  	DIR *dirp;
X  
Xdiff -c -r diffreg.c diffreg.c
X*** diffreg.c	Tue Jan 11 00:39:33 1994
X--- diffreg.c	Mon Mar 17 21:54:08 2003
X***************
X*** 270,281 ****
X  	char buf[BUFSIZ];
X  	register int i, f;
X  
X! 	signal(SIGHUP,done);
X! 	signal(SIGINT,done);
X! 	signal(SIGPIPE,done);
X! 	signal(SIGTERM,done);
X! 	tempfile = mktemp("/tmp/dXXXXX");
X! 	f = creat(tempfile,0600);
X  	if (f < 0) {
X  		fprintf(stderr, "diff: ");
X  		perror(tempfile);
X--- 270,281 ----
X  	char buf[BUFSIZ];
X  	register int i, f;
X  
X! 	signal(SIGHUP, (sig_t) done);
X! 	signal(SIGINT, (sig_t) done);
X! 	signal(SIGPIPE, (sig_t) done);
X! 	signal(SIGTERM, (sig_t) done);
X! 	strcpy(tempfile, "/tmp/dXXXXX");
X! 	f = mkstemp(tempfile);
X  	if (f < 0) {
X  		fprintf(stderr, "diff: ");
X  		perror(tempfile);
END-of-textproc/2bsd-diff/files/patch-aa
echo x - textproc/2bsd-diff/files/patch-ab
sed 's/^X//' >textproc/2bsd-diff/files/patch-ab << 'END-of-textproc/2bsd-diff/files/patch-ab'
X*** diff.1.orig	Mon Mar 17 23:04:45 2003
X--- diff.1	Mon Mar 17 23:06:54 2003
X***************
X*** 7,13 ****
X  .TH DIFF 1 "October 21, 1996"
X  .UC 4
X  .SH NAME
X! diff \- differential file and directory comparator
X  .SH SYNOPSIS
X  .B diff
X  [
X--- 7,13 ----
X  .TH DIFF 1 "October 21, 1996"
X  .UC 4
X  .SH NAME
X! diff \- 2.11BSD differential file and directory comparator
X  .SH SYNOPSIS
X  .B diff
X  [
X***************
X*** 260,269 ****
X  .SH FILES
X  /tmp/d?????
X  .br
X! /usr/libexec/diffh for 
X  .B \-h
X  .br
X! /bin/diff for directory diffs
X  .br
X  /bin/pr
X  .SH "SEE ALSO"
X--- 260,269 ----
X  .SH FILES
X  /tmp/d?????
X  .br
X! /usr/local/libexec/diffh for 
X  .B \-h
X  .br
X! /usr/local/bin/diff for directory diffs
X  .br
X  /bin/pr
X  .SH "SEE ALSO"
END-of-textproc/2bsd-diff/files/patch-ab
echo x - textproc/2bsd-diff/pkg-plist
sed 's/^X//' >textproc/2bsd-diff/pkg-plist << 'END-of-textproc/2bsd-diff/pkg-plist'
Xbin/diff
Xlibexec/diffh
Xman/man1/diff.1
END-of-textproc/2bsd-diff/pkg-plist
echo x - textproc/2bsd-diff/pkg-descr
sed 's/^X//' >textproc/2bsd-diff/pkg-descr << 'END-of-textproc/2bsd-diff/pkg-descr'
XThis is the original diff program from 2.11BSD.  It works better
Xwith very large files on systems with datasize limits.
X
XDefault FreeBSD limits datasize to 524288 kbytes.  This means that
XGNU diff processes that require more than this much ram will fail.
XThe 2.11BSD diff did not load the files in core and could operate
Xon considerably less ram.
END-of-textproc/2bsd-diff/pkg-descr
exit
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: nork 
State-Changed-When: Tue Mar 18 08:02:38 PST 2003 
State-Changed-Why:  
I want this. Oops, I'll handle this:-). 


Responsible-Changed-From-To: freebsd-ports-bugs->nork 
Responsible-Changed-By: nork 
Responsible-Changed-When: Tue Mar 18 08:02:38 PST 2003 
Responsible-Changed-Why:  
Now ports freeze. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50097 

From: Norikatsu Shigemura <nork@FreeBSD.org>
To: risner@stdio.com
Cc: FreeBSD-gnats-submit@FreeBSD.org
Subject: Re: ports/50097: New port: 2.11BSD version of diff/diffh, can work
 w/files that GNU Diff failes "memory exhausted"
Date: Wed, 19 Mar 2003 02:40:52 +0900 (JST)

 	I reviewd it.  If you OK, I'll commit this after ports freeze.
 
 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 # This is a shell archive.  Save it in a file, remove anything before
 # this line, and then unpack it by entering "sh file".  Note, it may
 # create directories; files and directories will be owned by you and
 # have default permissions.
 #
 # This archive contains:
 #
 #	2bsd-diff
 #	2bsd-diff/Makefile
 #	2bsd-diff/distinfo
 #	2bsd-diff/files
 #	2bsd-diff/files/patch-Makefile
 #	2bsd-diff/files/patch-diff.1
 #	2bsd-diff/files/patch-diff.c
 #	2bsd-diff/files/patch-diff.h
 #	2bsd-diff/files/patch-diffdir.c
 #	2bsd-diff/files/patch-diffreg.c
 #	2bsd-diff/pkg-descr
 #	2bsd-diff/pkg-plist
 #
 echo c - 2bsd-diff
 mkdir -p 2bsd-diff > /dev/null 2>&1
 echo x - 2bsd-diff/Makefile
 sed 's/^X//' >2bsd-diff/Makefile << 'END-of-2bsd-diff/Makefile'
 X# New ports collection makefile for:	2bsd-diff
 X# Date created:				Mon Mar 17 20:54:03 EST 2003
 X# Whom:					risner@stdio.com
 X#
 X# $FreeBSD$
 X#
 X
 XPORTNAME=	diff
 XPORTVERSION=	2.11
 XPORTREVISION=	0
 XCATEGORIES=	textproc
 XMASTER_SITES=	http://www.tribug.org/pub/tuhs/PDP-11/Distributions/ucb/2.11BSD/
 XPKGNAMEPREFIX=	2bsd-
 XDISTNAME=	file8
 X
 XMAINTAINER=	risner@stdio.com
 XCOMMENT=	2.11BSD diff utility
 X
 XEXTRACT_AFTER_ARGS=	| ${TAR} -xf - bin/diff man/man1/diff.1
 XWRKSRC=		${WRKDIR}/bin/diff
 X
 XUSE_REINPLACE=	YES
 X
 XMAN1=		2diff.1
 X
 Xpost-patch:
 X	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' \
 X				${WRKSRC}/../../man/man1/diff.1
 X
 X.include <bsd.port.mk>
 END-of-2bsd-diff/Makefile
 echo x - 2bsd-diff/distinfo
 sed 's/^X//' >2bsd-diff/distinfo << 'END-of-2bsd-diff/distinfo'
 XMD5 (file8.tar.gz) = 77397e6d554361c127592b1fea2d776f
 END-of-2bsd-diff/distinfo
 echo c - 2bsd-diff/files
 mkdir -p 2bsd-diff/files > /dev/null 2>&1
 echo x - 2bsd-diff/files/patch-Makefile
 sed 's/^X//' >2bsd-diff/files/patch-Makefile << 'END-of-2bsd-diff/files/patch-Makefile'
 X--- Makefile.orig	Tue Oct 22 13:29:46 1996
 X+++ Makefile	Wed Mar 19 01:29:12 2003
 X@@ -1,9 +1,9 @@
 X #	@(#)Makefile	4.1.1	1996/10/21
 X #
 X-DIFF=	/bin/diff
 X-DIFFH=	/usr/libexec/diffh
 X-PR=	/bin/pr
 X-CFLAGS=	-O -DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
 X+DIFF=	${PREFIX}/bin/2diff
 X+DIFFH=	${PREFIX}/libexec/2diffh
 X+PR=	/usr/bin/pr
 X+CFLAGS+=-DDIFF='"${DIFF}"' -DDIFFH='"${DIFFH}"' -DPR='"${PR}"'
 X SEPFLAG=-i
 X DESTDIR=
 X 
 X@@ -14,14 +14,15 @@
 X all: diff diffh
 X 
 X diff: ${OBJS}
 X-	cc ${CFLAGS} -o diff ${OBJS} ${SEPFLAG} ${LDFLAGS}
 X+	${CC} ${CFLAGS} -o diff ${OBJS} ${SEPFLAG} ${LDFLAGS}
 X 
 X diffh: diffh.o
 X-	cc -o diffh diffh.o ${SEPFLAG} ${LDFLAGS}
 X+	${CC} ${CFLAGS} -o diffh diffh.o ${SEPFLAG} ${LDFLAGS}
 X 
 X clean:
 X 	rm -f diff diffh ${OBJS} diffh.o
 X 
 X install: all
 X-	install -s diff ${DESTDIR}/bin/diff
 X-	install -s diffh ${DESTDIR}/usr/libexec/diffh
 X+	${BSD_INSTALL_PROGRAM} diff  ${DIFF}
 X+	${BSD_INSTALL_PROGRAM} diffh ${DIFFH}
 X+	${BSD_INSTALL_MAN}     ../../man/man1/diff.1 ${MANPREFIX}/man/man1/2diff.1
 END-of-2bsd-diff/files/patch-Makefile
 echo x - 2bsd-diff/files/patch-diff.1
 sed 's/^X//' >2bsd-diff/files/patch-diff.1 << 'END-of-2bsd-diff/files/patch-diff.1'
 X--- ../../man/man1/diff.1.orig	Tue Oct 22 14:00:30 1996
 X+++ ../../man/man1/diff.1	Wed Mar 19 02:06:08 2003
 X@@ -4,12 +4,12 @@
 X .\"
 X .\"	@(#)diff.1	6.4.1 (2.11BSD) 1996/10/21
 X .\"
 X-.TH DIFF 1 "October 21, 1996"
 X+.TH 2DIFF 1 "October 21, 1996"
 X .UC 4
 X .SH NAME
 X-diff \- differential file and directory comparator
 X+2diff \- 2.11BSD differential file and directory comparator
 X .SH SYNOPSIS
 X-.B diff
 X+.B 2diff
 X [
 X .B \-l
 X ] [
 X@@ -22,14 +22,14 @@
 X .B \-biwt
 X ] dir1 dir2
 X .br
 X-.B diff
 X+.B 2diff
 X [
 X \fB\-cefhn
 X ] [
 X \fB\-biwt\fR
 X ] file1 file2
 X .br
 X-.B diff
 X+.B 2diff
 X [
 X .BI \-D string
 X ] [
 X@@ -38,10 +38,10 @@
 X file1 file2
 X .SH DESCRIPTION
 X If both arguments are directories,
 X-.I diff
 X+.I 2diff
 X sorts the contents of the directories by name, and then runs the
 X regular file
 X-.I diff
 X+.I 2diff
 X algorithm (described below)
 X on text files which are different.
 X Binary files which differ,
 X@@ -51,7 +51,7 @@
 X .TP
 X .B \-l
 X long output format; each text file
 X-.I diff
 X+.I 2diff
 X is piped through
 X .IR pr (1)
 X to paginate it,
 X@@ -60,26 +60,26 @@
 X .TP
 X .B \-r
 X causes application of
 X-.I diff
 X+.I 2diff
 X recursively to common subdirectories encountered.
 X .TP
 X .B \-s
 X causes 
 X-.I diff
 X+.I 2diff
 X to report files which are the same, which are otherwise not mentioned.
 X .TP
 X .B \-Sname
 X starts a directory
 X-.I diff
 X+.I 2diff
 X in the middle beginning with file
 X .I name.
 X .PP
 X When run on regular files, and when comparing text files which differ
 X during directory comparison,
 X-.I diff
 X+.I 2diff
 X tells what lines must be changed in the files to bring them into agreement.
 X Except in rare circumstances,
 X-.I diff
 X+.I 2diff
 X finds a smallest sufficient set of file differences.
 X If neither
 X .I file1
 X@@ -163,7 +163,7 @@
 X version-to-version
 X .I ed
 X scripts ($2,$3,...) made by
 X-.I diff
 X+.I 2diff
 X need be on hand.
 X A `latest version' appears on
 X the standard output.
 X@@ -212,7 +212,7 @@
 X file to the other are marked in both files with with `! '.
 X 
 X Changes which lie within <context> lines of each other are grouped
 X-together on output.  (This is a change from the previous ``diff -c''
 X+together on output.  (This is a change from the previous ``2diff -c''
 X but the resulting output is usually much easier to interpret.)
 X .TP 9
 X .B \-h
 X@@ -223,7 +223,7 @@
 X .TP
 X .B \-Dstring
 X causes
 X-.I diff
 X+.I 2diff
 X to create a merged version of
 X .I file1
 X and
 X@@ -260,12 +260,12 @@
 X .SH FILES
 X /tmp/d?????
 X .br
 X-/usr/libexec/diffh for 
 X+%%PREFIX%%/libexec/2diffh for 
 X .B \-h
 X .br
 X-/bin/diff for directory diffs
 X+%%PREFIX%%/bin/2diff for directory diffs
 X .br
 X-/bin/pr
 X+/usr/bin/pr
 X .SH "SEE ALSO"
 X cmp(1), cc(1), comm(1), ed(1), diff3(1)
 X .SH DIAGNOSTICS
 X@@ -279,11 +279,11 @@
 X When comparing directories with the
 X \fB\-b, -w\fP or \fB-i\fP
 X options specified,
 X-.I diff
 X+.I 2diff
 X first compares the files ala
 X .I cmp,
 X and then decides to run the
 X-.I diff
 X+.I 2diff
 X algorithm if they are not equal.
 X This may cause a small amount of spurious output if the files
 X then turn out to be identical because the only differences are
 END-of-2bsd-diff/files/patch-diff.1
 echo x - 2bsd-diff/files/patch-diff.c
 sed 's/^X//' >2bsd-diff/files/patch-diff.c << 'END-of-2bsd-diff/files/patch-diff.c'
 X--- diff.c.orig	Wed Nov 13 05:31:26 1991
 X+++ diff.c	Wed Mar 19 01:31:23 2003
 X@@ -176,9 +176,10 @@
 X 	return (a > b ? a : b);
 X }
 X 
 X+sig_t
 X done()
 X {
 X-	if (tempfile)
 X+	if (tempfile[0])
 X 		unlink(tempfile);
 X 	exit(status);
 X }
 X@@ -198,7 +199,6 @@
 X char *p;
 X {
 X 	register char *q;
 X-	char *realloc();
 X 
 X 	if ((q = realloc(p, (unsigned)n)) == NULL)
 X 		noroom();
 END-of-2bsd-diff/files/patch-diff.c
 echo x - 2bsd-diff/files/patch-diff.h
 sed 's/^X//' >2bsd-diff/files/patch-diff.h << 'END-of-2bsd-diff/files/patch-diff.h'
 X--- diff.h.orig	Thu Aug 29 06:44:35 1985
 X+++ diff.h	Wed Mar 19 01:35:49 2003
 X@@ -5,10 +5,11 @@
 X  */
 X 
 X #include <stdio.h>
 X+#include <stdlib.h>
 X #include <ctype.h>
 X #include <sys/param.h>
 X #include <sys/stat.h>
 X-#include <sys/dir.h>
 X+#include <dirent.h>
 X #include <signal.h>
 X 
 X /*
 X@@ -61,7 +62,7 @@
 X  */
 X int	status;
 X int	anychange;
 X-char	*tempfile;		/* used when comparing against std input */
 X+char	tempfile[MAXPATHLEN];	/* used when comparing against std input */
 X 
 X /*
 X  * Variables for diffdir.
 X@@ -77,9 +78,9 @@
 X char	*file1, *file2, *efile1, *efile2;
 X struct	stat stb1, stb2;
 X 
 X-char	*malloc(), *talloc(), *ralloc();
 X+char	*talloc(), *ralloc();
 X char	*savestr(), *splice(), *splicen();
 X-char	*mktemp(), *copytemp(), *rindex();
 X-int	done();
 X+char	*copytemp();
 X+sig_t	done();
 X 
 X extern	char diffh[], diff[], pr[];
 END-of-2bsd-diff/files/patch-diff.h
 echo x - 2bsd-diff/files/patch-diffdir.c
 sed 's/^X//' >2bsd-diff/files/patch-diffdir.c << 'END-of-2bsd-diff/files/patch-diffdir.c'
 X--- diffdir.c.orig	Wed Nov 13 05:31:29 1991
 X+++ diffdir.c	Wed Mar 19 01:36:38 2003
 X@@ -172,7 +172,7 @@
 X 	char *cp;
 X {
 X 	register struct dir *dp = 0, *ep;
 X-	register struct direct *rp;
 X+	register struct dirent *rp;
 X 	register int nitems, n;
 X 	DIR *dirp;
 X 
 END-of-2bsd-diff/files/patch-diffdir.c
 echo x - 2bsd-diff/files/patch-diffreg.c
 sed 's/^X//' >2bsd-diff/files/patch-diffreg.c << 'END-of-2bsd-diff/files/patch-diffreg.c'
 X--- diffreg.c.orig	Tue Jan 11 14:39:33 1994
 X+++ diffreg.c	Wed Mar 19 01:38:48 2003
 X@@ -270,12 +270,12 @@
 X 	char buf[BUFSIZ];
 X 	register int i, f;
 X 
 X-	signal(SIGHUP,done);
 X-	signal(SIGINT,done);
 X-	signal(SIGPIPE,done);
 X-	signal(SIGTERM,done);
 X-	tempfile = mktemp("/tmp/dXXXXX");
 X-	f = creat(tempfile,0600);
 X+	signal(SIGHUP, (sig_t) done);
 X+	signal(SIGINT, (sig_t) done);
 X+	signal(SIGPIPE, (sig_t) done);
 X+	signal(SIGTERM, (sig_t) done);
 X+	strcpy(tempfile, "/tmp/dXXXXX");
 X+	f = mkstemp(tempfile);
 X 	if (f < 0) {
 X 		fprintf(stderr, "diff: ");
 X 		perror(tempfile);
 END-of-2bsd-diff/files/patch-diffreg.c
 echo x - 2bsd-diff/pkg-descr
 sed 's/^X//' >2bsd-diff/pkg-descr << 'END-of-2bsd-diff/pkg-descr'
 XThis is the original diff program from 2.11BSD.  It works better
 Xwith very large files on systems with datasize limits.
 X
 XDefault FreeBSD limits datasize to 524288 kbytes.  This means that
 XGNU diff processes that require more than this much ram will fail.
 XThe 2.11BSD diff did not load the files in core and could operate
 Xon considerably less ram.
 END-of-2bsd-diff/pkg-descr
 echo x - 2bsd-diff/pkg-plist
 sed 's/^X//' >2bsd-diff/pkg-plist << 'END-of-2bsd-diff/pkg-plist'
 Xbin/2diff
 Xlibexec/2diffh
 END-of-2bsd-diff/pkg-plist
 exit
State-Changed-From-To: analyzed->closed 
State-Changed-By: nork 
State-Changed-When: Sat Mar 22 23:24:59 PST 2003 
State-Changed-Why:  
Committed, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=50097 
>Unformatted:
