17 August 2007. SMS. Gzip 1.3.12 for VMS (1.3.12a) ============================= ------------------------------------------------------------------------ Disclaimer ---------- No claims of any sort are made herein. The main gzip 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 gzip version 1.3.12, a GNU free file compression utility. 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. OpenVMS IA64 V8.3, HP C V7.3-018. OpenVMS VAX V7.3, Compaq C V6.4-005. ------------------------------------------------------------------------ News ---- Version 1.3.12a 2007-08-15 --------------------------- - General update to gzip version 1.3.12. Version 1.3.5a 2006-07-01 -------------------------- - New. VMS-specific changes include: - Where C RTL support is available, command-line case is preserved on (non-VAX) systems with SET PROCESS /PARSE_STYLE = EXTENDED. - Where C RTL support is available, file open operations use a callback function to set non-default RMS parameters: file extend quantity (deq) = 16384, multi-block count (mbc) = 127, and multi-buffer count (mbf) = 2. Explicitly set RMS_DEFAULT values override these built-in values. ("-vv" shows details.) - New MMS or MMK builders with automatically generated source file dependencies. ------------------------------------------------------------------------ Changes to Source Files ----------------------- Files new for VMS (all in [.vms]): collect_deps.com Dependency collector for descrip_mkdeps.mms. config.h_vms VMS-specific config.h. decc_ver.c Program to show versions: VMS, C compiler, C run-time library. descrip.mms Main MMK or MMS description ("make") file. descrip_config.mms config.h description file. descrip_deps.mms Source dependency description file. descrip_mkdeps.mms Source dependency generator description file. descrip_src.mms Source list description file. fcntl.h Booster/replacement for . getopt.h Wrapper to include [.lib]getopt_.h. signal.h Booster for . stat-time.h VAXC-safe replacement for [.lib]stat-time.h. stat.h Booster for . stdbool.h Booster/replacement for . time.h Booster for . unistd.h Booster/replacement for . utime.h Wrapper/replacement for . vms.h VMS-specific header file. (Mate for vms.c.) vms_notes.txt These notes. Files modified for VMS: tailor.h Changed to avoid C macro conflicts with config.h. Added macros to use VMS-specific functions for EXPAND() and OPEN(). Changed to include "vms.h", for compiler complaint reduction. [.lib]xmalloc.c Changed an enum to a #define in two places to accomodate VAX C. [.vms]vms.c Added various VMS-specific code to the original file name wildcard expansion: DEC C run-time initialization, file open callback function for better RMS parameters, utime() (as needed). [.vms]gzip.hlp Reconciled with reality. Adjusted format in minor ways. ------------------------------------------------------------------------ Source URLs ----------- http://www.gzip.org/ http://ftp.gnu.org/gnu/gzip/ ------------------------------------------------------------------------ Instructions ------------ Building -------- 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 "LARGE" (except VAX). MMS or MMK is required. Various build options are explained in the main builder file, [.vms]descrip.mms. The builder must be run from the main source directory, not the [.vms] subdirectory. A simple build might look like this (MMS shown, but MMK should work as well): MMS /DESCRIP = [.VMS] ! Small-file (DEC C). MMS /DESCRIP = [.VMS] /MACRO = LARGE=1 ! Large-file (DEC C). System-architecture-specific files (like objects and executables) are placed in separate directories, such as [.ALPHA], [.IA64], or [.VAX]. Large-file products get their own directories, [.ALPHAL] or [.IA64L]. On VAX, VAX C products are placed in [.VAXV], GNU C products in [.VAXG]. Each product builder announces what the destination directory will be when it is run. Alert compilers will emit a harmless complaint ("%CC-I-QUESTCOMPARE") about zip.c. The following obsolete builders and document have not been removed from the kit, but should be ignored: [.vms]Makefile.mms [.vms]Makefile.vms [.vms]Makefile.gcc [.vms]makegzip.com [.vms]Readme.vms Installation ------------ To complete the installation, the executable may be left in place, or moved (or copied) to a convenient place. While other methods (like DCL$PATH) exist, it's common to define one or more DCL symbols to make the gzip executable available as a foreign command. These symbol definitions may be placed in a user's SYS$LOGIN:LOGIN.COM, or in a more central location, like SYS$MANAGER:SYLOGIN.COM. A typical symbol definition might look like this: GZIP :== $ dev:[dir]GZIP.EXE It's common to define additional foreign-command symbols for other related commands, "gunzip" and "gzcat", to obviate specifying "-d" and "-cd", respectively, on a "gzip" command line. For example: GUNZIP :== $ dev:[dir]GZIP.EXE -d GZCAT :== $ dev:[dir]GZIP.EXE -cd Currently, on UNIX systems, "gunzip" and "gzcat" are, by default, short shell scripts which act similarly. It was once common on UNIX systems (and it may still be) to create hard links to the "gzip" executable from "gunzip" and "gzcat" to get the same behavior. On a VMS system, this may be done using SET FILE /ENTER to create aliases. For example: SET FILE /ENTER = dev:[dir]GZCAT.EXE dev:[dir]GZIP.EXE SET FILE /ENTER = dev:[dir]GUNZIP.EXE dev:[dir]GZIP.EXE See HELP SET FILE /ENTER for cautions regarding its use. Using this scheme, however, requires that gzip be compiled with the C macro GNU_STANDARD defined to be zero, which is _not_ done by default. For example: MMS /DESC = [.VMS] /MACR = (LARGE=1, LOCAL_GZIP=GNU_STANDARD=0) By default (GNU_STANDARD _not_ zero), the name of the program is ignored (GNU standard behavior), and it will act as gzip, no matter what its name. Help Library ------------ A VMS HELP file is supplied in [.vms]gzip.hlp. To be used, it must be added to a HELP library, either an existing library or one just for gzip. A new gzip help library may be created using a command like: MMS /DESCRIP = [.VMS] HELP When a new HELP library is created, a logical name "HLP$LIBRARY_n" may be defined to allow the HELP utility to find it. See "HELP HELP /USERLIBRARY" for details. ------------------------------------------------------------------------ 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. When reporting problems, especially build problems, with gzip for VMS, it is often useful to reveal precise compiler, run-time library, and VMS version information. The program DECC_VER.C (included in the kit) is intended to make that easier. ------------------------------------------------------------------------ Steven M. Schweda sms@antinode.org 382 South Warwick Street (+1) 651-699-9818 Saint Paul MN 55105-2547