23 June 2007. SMS. GNU DIFFUTILS 2.8.1 for VMS (2.8.1a) ==================================== ------------------------------------------------------------------------ Disclaimer ---------- No claims of any sort are made herein. The main GNU diffutils developers are probably unaware of this effort. Any suggestions for improving the code in the VMS-specific sections are welcome, but low expectations are more realistic than high ones. ------------------------------------------------------------------------ Description ----------- This note accompanies a quick VMS port of GNU diffutils version 2.8.1, a GNU free file comparison utility collection. The most obvious features seem to work, but many have not been tested. Built and tested (slightly) in these environments: OpenVMS Alpha V7.3-2, HP C V7.1-015, TCPIP V5.4 - ECO 6 OpenVMS IA64 V8.3, HP C V7.3-018 on OpenVMS IA64 V8.3 OpenVMS VAX V7.3, Compaq C V6.4-005, TCPIP V5.1. ------------------------------------------------------------------------ News ---- Version 2.8.1a 2007-06-23 -------------------------- - New. Bugs are possible. ------------------------------------------------------------------------ Changes to Source Files ----------------------- Files new for VMS: [.vms] collect_deps.com Dependency collector for descrip_mkdeps.mms. config.h VMS-specific config.h. "a" version suffix. descrip.mms Main MMK or MMS description ("make") file. descrip_mkdeps.mms Source dependency generator description file. descrip_src.mms Source list description file. descrip_src_flags.mms Compile and link flags description file. fnmatch.h VMS-specific fnmatch.h. gdiff_ed.com Template for an editor command procedure ("sys$login:gdiff_ed.com") to be used for interactive editing in "sdiff". vms_name_fix.sh UNIX shell script to undo ODS2 file name damage. vms_notes.txt These notes. [.vmslib] decc_ver.c Program to show versions: VMS, C compiler, C run-time library. vms.c Various VMS-specific code: DEC C run-time initialization, temporary logical name creation, file specification parsing. vms_rms.h NAM[L]-related macros. [.] descrip*.mms Various MMS description files. Files modified for VMS: [.lib] tempname.c Changed to accomodate a VMS-style P_tmpdir definition ("SYS$SCRATCH:", in ). [.src] diff.c Added "#include " to avoid %CC-I-IMPLICITFUNC for posix2_version(). diff3.c Added VMS-specific code for vfork()-execv() and related I/O redirection. ifdef.c Added a type cast to remove a %CC-I-QUESTCOMPARE1 complaint. sdiff.c Added VMS-specific code for vfork()-execv() and related I/O redirection, and for interactive editing. ------------------------------------------------------------------------ Home source URL --------------- http://www.gnu.org/software/diffutils/ http://ftp.gnu.org/gnu/diffutils/ ftp://ftp.gnu.org/gnu/diffutils/ ------------------------------------------------------------------------ Instructions ------------ Extract the files from the distribution kit. The kit includes objects and executables for Alpha, IA64, and VAX, in the corresponding host-specific subdirectories. These builds were done with option (explained below) "LARGE" (except VAX). SET DEFAULT [.DIFFUTILS-2_8_1_VMS.VMS] ! For convenience. MMS /MACRO = (LARGE=1) ! Non-VAX (with large-file support). MMS ! VAX. Additional build options are described in the main builder file, [.vms]descrip.mms. Set the symbols for the foreign commands. For example: CMP :== $ actual_device:[actual.directory]CMP.EXE GDIFF :== $ actual_device:[actual.directory]DIFF.EXE DIFF3 :== $ actual_device:[actual.directory]DIFF3.EXE SDIFF :== $ actual_device:[actual.directory]SDIFF.EXE Because of the VMS "DIFFERENCES" command, "DIFF" would not be a good choice for DIFF.EXE. Note that diff3 and sdiff create (vfork()+execv()) subproceses which run diff, using "gdiff_exe:diff" to find the diff executable (as specified in [.vms]config.h: DEFAULT_DIFF_PROGRAM). If the logical name gdiff_exe is not defined, the program will define a user-mode (temporary) logical name for gdiff_exe which points to the device:[directory] where the diff3 or sdiff executable resides. The --diff-program=PROGRAM option can override this default. Similarly, the interactive editing feature in sdiff will use an editor command procedure, "@ sys$login:gdiff_ed.com" (as specified in [.vms]config.h: DEFAULT_EDITOR_PROGRAM). A template procedure (using EDIT /TPU) is provided as [.vms]gdiff_ed.com. These programs generally form file paths the UNIX way, so some care may be needed for non-trivial cases. For example, to compare two files like [.d1.x1]a1.txt and [.d1.x2]a1.txt, either of the following commands should work: gdiff [.d1.x1]a1.txt [.d1.x2]a1.txt ! VMS-style. gdiff d1/x1/a1.txt d1/x2/a1.txt ! UNIX-style. However, for a recursive diff, where diff will be constructing the paths to the files, the directories must be specified in a UNIX form: gdiff -r d1/x1 d1/x2 ------------------------------------------------------------------------ The accompanying source kit may suffer from storage on an ODS2 file system, which does not preserve case or allow multiple dots in a file name. Building this kit should work on VMS, but it may be expected to fail on other systems. To use this kit on a non-VMS system, the files may need to be renamed to restore their original mixed-case and/or multi-dot names. The UNIX shell script "vms_name_fix.sh" (or something like it) should do the job. ------------------------------------------------------------------------ Steven M. Schweda (+1) 651-699-9818 (voice) 382 South Warwick Street sms@antinode.org Saint Paul MN 55105-2547