HECKER@fed1.prime.com (12/17/88)
I have just finished porting version 1.4 of GNU diff and diff3 to the Prime EXL under System V. At last, I have context diffs! Thanks again to the Free Software Foundation for its work. However, I had a slight problem in building diff3, even after changing Makefile for System V. Since diff3.c does not include diff.h, it does not replace calls to bcmp and bzero with calls to the equivalent System V routines (as is done for diff.c). I created a new file diff3.h (derived from diff.h) including the necessary stuff. As I mentioned in the README-EXL file, I did not know if it was anyone's intention to include diff.h in diff3.h, so I just took the quick and dirty way out by creating a new file. Below I have included a shar file containing my diff3.h, as well as the README-EXL file containing the diffs necessary to existing files: #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of shell archive." # Contents: README-EXL diff3.h # Wrapped by hecker@fops1 on Fri Dec 16 17:44:41 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'README-EXL' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README-EXL'\" else echo shar: Extracting \"'README-EXL'\" \(5641 characters\) sed "s/^X//" >'README-EXL' <<'END_OF_FILE' X GNU DIFF and DIFF3 Utilities, Version 1.4 X Prime EXL Installation and Release Notes X X Frank Hecker X Federal Operations X Prime Computer, Inc. X X December 16, 1988 X X XIntroduction X XThis directory contains version 1.4 of the GNU diff and diff3 Xutilities, (mostly) compatible replacements for the System V and BSD Xdiff utilities, ported to the Prime EXL Series of 80386-based UNIX Xsupermicro systems running AT&T System V/386. X XThe major advantage of GNU diff and diff3 for System V users is that Xthey implement the so-called "context diff" feature (diff -c), in Xwhich changed lines are printed in the context of their surrounding Xlines. X XThese utilities are part of the GNU family of free software from the XFree Software Foundation. X X XInstallation X XTo install the GNU diff and diff3 utilities on the Prime EXL please do Xthe following steps. X XFirst, load the tape: X X # cd /usr/local/src (or some other suitable directory) X # cpio -icvdumB </dev/rct/c0d5 X XSecond, if necessary create the additional directories required for Xthe installation: X X # mkdir -p /usr/local/gnu (if not already present) X XFinally, build and install the utilities: X X # cd diff X # make X # make install X XThe utilities are then invoked by the commands "diff" and "diff3", Xassuming that the directory /usr/local/gnu is in your PATH variable. X XNote that GNU diff and diff3 are not installed by default in X/usr/local/bin since that directory is before /bin and /usr/bin in XPATH on many systems and I did not wish the GNU diff and diff3 to be Xused by default instead of the standard System V diff and diff3. X XIf you wish to place GNU diff and diff3 in /usr/local/bin then you Xmust change the definition of bindir in Makefile and rebuild, since XGNU diff3 executes GNU diff and must know its absolute pathname. X XIf you wish to change the names of the utilities (say to gdiff and Xgdiff3) then you must again modify Makefile appropriately. X X XChanges for the Prime EXL X XTwo changes were necessary to port GNU diff and diff3 to the EXL. XFirst, the make file was changed to enable System V-specific flags and Xto install the runfiles correctly for System V: X X$ diff -c Makefile-bk Makefile X*** Makefile-bk Wed Oct 26 18:01:38 1988 X--- Makefile Sat Dec 10 14:44:08 1988 X*************** X*** 21,30 **** X X # You can compile this with ordinary cc as well, X # but gcc makes it faster. X! CC=gcc -O X! CFLAGS = -g X X! bindir=/usr/local/bin X prefix= X X # Diff3 needs to run diff in a subsidiary process. If you don't have X--- 21,31 ---- X X # You can compile this with ordinary cc as well, X # but gcc makes it faster. X! CC=cc -O X! CFLAGS = -g -DUSG X! LIBS = -lPW X X! bindir=/usr/local/gnu X prefix= X X # Diff3 needs to run diff in a subsidiary process. If you don't have X*************** X*** 40,52 **** X all: diff diff3 X X diff3: diff3.o X! $(CC) -o diff3 $(CFLAGS) $(LDFLAGS) diff3.o X X diff3.o: diff3.c X ${CC} -c ${CFLAGS} -DDIFF_PROGRAM=\"${diff_program}\" diff3.c X X diff: $(objs) X! $(CC) -o diff $(CFLAGS) $(LDFLAGS) $(objs) X X $(objs): diff.h X X--- 41,53 ---- X all: diff diff3 X X diff3: diff3.o X! $(CC) -o diff3 $(CFLAGS) $(LDFLAGS) diff3.o $(LIBS) X X diff3.o: diff3.c X ${CC} -c ${CFLAGS} -DDIFF_PROGRAM=\"${diff_program}\" diff3.c X X diff: $(objs) X! $(CC) -o diff $(CFLAGS) $(LDFLAGS) $(objs) $(LIBS) X X $(objs): diff.h X X*************** X*** 60,71 **** X install-diff: $(prefix)$(bindir)/diff X X $(prefix)$(bindir)/diff: diff X! install diff $(prefix)$(bindir)/diff X X install-diff3: $(prefix)$(bindir)/diff3 X X $(prefix)$(bindir)/diff3: diff3 X! install diff3 $(prefix)$(bindir)/diff3 X X diff.tar: $(tapefiles) X mkdir tmp X--- 61,72 ---- X install-diff: $(prefix)$(bindir)/diff X X $(prefix)$(bindir)/diff: diff X! install -f $(prefix)$(bindir) diff X X install-diff3: $(prefix)$(bindir)/diff3 X X $(prefix)$(bindir)/diff3: diff3 X! install -f $(prefix)$(bindir) diff3 X X diff.tar: $(tapefiles) X mkdir tmp X X(Note that this output was generated using the context diff feature of XGNU diff.) X XSecond, diff3.c was modified to include a new header file diff3.h X(derived from diff.h) containing macros defining the BSD routines Xbcmp, bcopy, and bzero in terms of System V system calls: X X$ diff -c diff3.c-bk diff3.c X*** diff3.c-bk Mon Oct 10 04:36:00 1988 X--- diff3.c Fri Dec 16 16:17:45 1988 X*************** X*** 108,113 **** X--- 108,115 ---- X #include <stdio.h> X #include <ctype.h> X X+ #include "diff3.h" X+ X /* X * Internal data structures and macros for the diff3 program; includes X * data structures for both diff3 diffs and normal diffs. X XI would have included diff.h itself in diff3.c, but I was not sure if Xthere would be conflicts in variable names, etc., and thus I took the Xeasy way out. X X XDocumentation X XAs of now there is no man page or on-line documentation for the GNU Xdiff and diff3 utilities. Please see the README file, as well as the Xoriginal documentation for diff and diff3 under System V and BSD. X X XRemaining Problems and Issues X XNone at this time. X X XProblem Reporting X XPlease direct any problems or questions regarding the Prime EXL port Xof GNU diff and diff3 to the following address(es): X X U.S. mail: Frank Hecker X Prime Computer, Inc. X 1375 Piccard Dr. X Rockville MD 20850 X X Phone: 1-301-948-7010 x308 X X E-mail: hecker@fed1.prime.com X XHowever, please note that this program is not an official Prime Xproduct and is not supported or warrantied in any way whatsoever by Xmyself, Prime Computer, Inc., or the Free Software Foundation. It is Xmade available to third parties under the terms of the GNU diff Xgeneral public license; see the file COPYING for more details. END_OF_FILE if test 5641 -ne `wc -c <'README-EXL'`; then echo shar: \"'README-EXL'\" unpacked with wrong size! fi # end of 'README-EXL' fi if test -f 'diff3.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'diff3.h'\" else echo shar: Extracting \"'diff3.h'\" \(1323 characters\) sed "s/^X//" >'diff3.h' <<'END_OF_FILE' X/* Definitions for GNU DIFF (diff3) X Copyright (C) 1988 Free Software Foundation, Inc. X XThis file is not officially part of GNU DIFF, but was created from Xdiff.h by Frank Hecker of Prime Computer, Inc., on December 16, 1988, Xas part of the Prime EXL port of GNU diff3. It is subject to the same Xlicense terms and conditions as the original GNU DIFF files. X XGNU DIFF is distributed in the hope that it will be useful, Xbut WITHOUT ANY WARRANTY. No author or distributor Xaccepts responsibility to anyone for the consequences of using it Xor for whether it serves any particular purpose or works at all, Xunless he says so in writing. Refer to the GNU DIFF General Public XLicense for full details. X XEveryone is granted permission to copy, modify and redistribute XGNU DIFF, but only under the conditions described in the XGNU DIFF General Public License. A copy of this license is Xsupposed to have been given to you along with GNU DIFF so you Xcan know your rights and responsibilities. It should be in a Xfile named COPYING. Among other things, the copyright notice Xand this notice must be preserved on all copies. */ X X X#ifdef USG X/* Define needed BSD functions in terms of sysV library. */ X X#define bcopy(s,d,n) memcpy((d),(s),(n)) X#define bcmp(s1,s2,n) memcmp((s1),(s2),(n)) X#define bzero(s,n) memset((s),0,(n)) X#endif END_OF_FILE if test 1323 -ne `wc -c <'diff3.h'`; then echo shar: \"'diff3.h'\" unpacked with wrong size! fi # end of 'diff3.h' fi echo shar: End of shell archive. exit 0