                                                29 June 2022.  SMS.

                    GNU Diffutils 3.3 for VMS (3.3b)
                    ================================

------------------------------------------------------------------------

      Disclaimer
      ----------

   No claims of any sort are made herein.  The main GNU Diffutils
developers appear not to be particularly interested in 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
3.3, 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:

Alpha objects and executables (built on VMS V8.4-2L1 with VSI C
V7.4-002).

IA64 objects and executable (built on VMS V8.4-2L3 with VSI C V7.4-001).

VAX objects and executables (built on VMS V7.3 with Compaq C V6.4-005).

x86_64 objects and executable (built on VMS V8.4-2L3 with VSI C X7.4-547
(GEM 50V6F)).

------------------------------------------------------------------------

      News
      ----

   Version 3.3b 2022-06-21
   -----------------------

- Changed VMS builders and jacket header files to accommodate x86_64
  hardware architecture and VSI C compilers.
  [.vms]DESCRIP.MMS, [.vms]DESCRIP_SRC.MMS, [.vms]inttypes.h,
  [.vms]limits.h, [.vms]stdint.h

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 3.3a 2014-01-22
   -----------------------

- General update to version 3.3.  The new --no-dereference option will
  be available only on systems with a C RTL modern enough to support
  symbolic links (non-VAX, __CRTL_VER >= 70301000), and effective only
  on systems which actually support symbolic links.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 3.2a 2012-10-08
   -----------------------

- General update to version 3.2.

- "sdiff -o" had problems with contamination from one edit to the next,
  and some temporary editor files ("SYS$SCRATCH:SDIFF*.") might not be
  deleted.  Bad carriage control in the interactive edit help
  ([.src]sdiff.c:give_help()) caused a prompt and user input to
  overwrite help text instead of appearing on a new line.  Removed the
  old VMS-specific handling of temporary editor files to solve the
  contamination problem.  Added VMS-specific code to avoid accumulation
  of many multiple versions of temporary editor files.  Replaced the
  normal unlink() function with a VMS-specific one to delete multiple
  versions of a temporary editor file.  Added a VMS-specific newline to
  the interactive edit help text to solve the appearance problem.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 3.0a 2010-06-05
   -----------------------

- General update to version 3.0.  Moved some VMS specifics from
  [.vms]config.h to various jacket header files in [.vms].

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 2.8.7b  2009-12-17
   --------------------------

- Added "ctx = stm" (on VMS) to the open() arguments in [.src]cmp.c. 
  This seems to resolve a complaint involving --ignore-initial applied
  to Alpha object files (Record format: Variable length).
  http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1390617

- Added VMS-specific code to work better with redirected output (PIPE,
  DEFINE SYS$OUTPUT).  Now, generic code will use a special,
  RMS-friendly fwrite()-replacement function, [.vmslib]vms.c:
  vms_fwrite(), which switches the order of arguments (ptr, 1, N, file)
  to (ptr, N, 1, file), so that one N-byte record will be produced,
  instead of N 1-byte records.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 2.8.7a  2008-09-24
   --------------------------

- New.  Between the unreleased status of Diffutils version 2.8.7, and my
  work, bugs are possible, but --ignore-file-name-case seems to work
  better than it did in 2.8.1.

- New VMS-specific code sets the default value for the
  --[no-]ignore-file-name-case option according to the current
  SET PROCESS /CASE_LOOKUP setting.  (Override this default with an
  explicit --[no-]ignore-file-name-case option.)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

   Version 2.8.1a  2007-06-23
   --------------------------

- New.  Bugs are possible.

------------------------------------------------------------------------

      Changes to Source Files
      -----------------------

   Files new for VMS:

         [.vms]

      alloca.h            VMS-specific alloca.h.

      COLLECT_DEPS.COM    Dependency collector for descrip_mkdeps.mms.

      config.h            VMS-specific config.h.  "a" version suffix.

      configmake.h        VMS-specific (empty) header file.

      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.

      fcntl.h             Jacket for <fcntl.h>.

      fnmatch.h           Processed [.lib]fnmatch.in.h.

      GDIFF_ED.COM        Template for an editor command procedure
                          ("SYS$LOGIN:GDIFF_ED.COM") to be used for
                          interactive editing in "sdiff".

      getopt.h            Processed [.lib]getopt.in.h.

      inttypes.h          Jacket for <inttypes.h>.

      limits.h            Jacket for <limits.h>.

      paths.h             VMS-specific paths.h.

      signal.h            Jacket for <signal.h>.

      stat.h              Jacket for <stat.h>.

      stdint.h            VMS-specific stdint.h.

      stdio.h             Jacket for <stdio.h>.

      string.h            Jacket for <string.h>.

      time.h              Jacket for <time.h>.

      version.h           Manually generated version.h.

      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,
                          replacement for unlink() to delete multiple
                          file versions ("<name>;*").

      vms_rms.h           NAM[L]-related macros.


         [.<various>]

      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 <stdio.h>).


         [.src]

      cmp.c               Added C macro CMP_OPEN_ARG, to supply
                          VMS-specific open() argument(s) ("ctx = stm",
                          defined in the VMS-specific [.vms]config.h).

      diff.c              Added VMS-specific code to set the default
                          value for the --[no-]ignore-file-name-case
                          option according to the current SET PROCESS
                          /CASE_LOOKUP setting.

      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.  Restored some
                          signal-handling code which was lost when the
                          mainstream code dropped vfork() in favor of
                          fork().  vfork() is still used on VMS.

      version.c           Manually generated version string storage.


   Files modified for Tru64:

         [.tests]

      Makefile.am        http://lists.gnu.org/archive/html/
      Makefile.in        bug-diffutils/2013-03/msg00014.html

------------------------------------------------------------------------

      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-3_3A_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.  (Expect a %CC-I-QUESTCOMPARE complaint when
compiling [.lib]gettime.c, [.lib]strftime.c, [.src]context.c, and
[.src]diff.c, and a few more on VAX.)

   Set the symbols for the foreign commands.  For example:

      GCMP   :== $ actual_device:[actual.directory]CMP.EXE
      GDIFF  :== $ actual_device:[actual.directory]DIFF.EXE
      GDIFF3 :== $ actual_device:[actual.directory]DIFF3.EXE
      GSDIFF :== $ actual_device:[actual.directory]SDIFF.EXE

Because of the VMS "DIFFERENCES" command, "DIFF" would not be a good
choice for DIFF.EXE.  The "G" prefix on other symbol names is less
critical (and could be omitted, according to user preference).

   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]paths.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

------------------------------------------------------------------------

   Steven M. Schweda               (+1) 651-699-9818  (voice)
   382 South Warwick Street        sms@antinode.info
   Saint Paul  MN  55105-2547

