pusateri@romeo.cs.duke.edu (Thomas J. Pusateri) (05/11/89)
I am trying to bring up RCS (the Revision Control System from Purdue) on a unix-pc and realize that the diff -n option that RCS requires is not standard on system V machines. I then tried to bring up GNU diff but it depends on the directory(3) library of subroutines (opendir,closedir,etc) that is strictly BSD. I looked at the Public Domain versions of diff on simtel20 but they do not include the -n option either. Has anyone writtten a version of diff that includes the -n option but will compile under sys V R2? Or has anyone provided the directory(3) BSD routines for sysv so that I can use GNU diff? RCS is a wonderful tool that I would prefer not to do without. Thanks, Tom Pusateri National Biomedical Simulation Resource Duke University Medical Center pusateri@nbsr.mc.duke.edu pusateri@romeo.cs.duke.edu
mark@jhereg.Jhereg.MN.ORG (Mark H. Colburn) (05/12/89)
In article <14468@duke.cs.duke.edu> pusateri@romeo.cs.duke.edu (Thomas J. Pusateri) writes: >I am trying to bring up RCS (the Revision Control System from Purdue) on >a unix-pc and realize that the diff -n option that RCS requires is not >standard on system V machines. I then tried to bring up GNU diff but it >depends on the directory(3) library of subroutines (opendir,closedir,etc) >that is strictly BSD. I looked at the Public Domain versions of diff on >simtel20 but they do not include the -n option either. Has anyone writtten >a version of diff that includes the -n option but will compile under sys V R2? >Or has anyone provided the directory(3) BSD routines for sysv so that I >can use GNU diff? RCS is a wonderful tool that I would prefer not to do >without. I have brought up the Revision Control System (RCS) on a 3b1 (SysVr2) and a Convergent S/80 (SysVr3). For the 3b1, I used Doug Gwyn's dirent library, which is in the public domain, Sys5r3 includes the new style directory stuff anyways. It required a bit of fiddling with both the RCS and GNU-DIFF sources to make it work, but the changes were minimal. I cannot say enough about Doug's dirent package. If you don't have it, get it! It works great, and make porting things to or from POSIX, BSD, SysVr3, etc., painless. The package is available on uunet and other comp.sources.unix archives. Anyways, once the dirent package is installed, bringing put GNU-DIFF is a piece of cake. Make sure that the two files that use the directory stuff #include <dirent.h> and add the line "#define direct dirent" (this fixes BSD to Sys5r3/POSIX namespace mapping), and it should all just work. I don't have the sources on line any more, but I beleive that the GNU-DIFF code has this stuff enclosed in "#ifdef SYSVR3". I just changed this to be "#if defined(SYSVR3) || defined(DIRENT)" and added "-DDIRENT" to my cflags... I also changed the RCS code to use the POSIX style dirent libraries to make porting easier. This was relatively straight forward and made the code run a bit faster, but is not important if you alread got the stuff to compile and work. -- Mark H. Colburn mark@jhereg.mn.org Minnetech Consulting, Inc.