6 April 2007. SMS. BZIP2 1.0.4b Changes for VMS ============================ ------------------------------------------------------------------------ Disclaimer ---------- No claims of any sort are made herein. The main BZIP2 developer seems indifferent to 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 BZIP2 version 1.0.4, a freely available data compressor. 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.2-022. (See note below.) OpenVMS VAX V7.3, Compaq C V6.4-005. ------------------------------------------------------------------------ Home source URL --------------- http://www.bzip.org ------------------------------------------------------------------------ News ---- Version 1.0.4b 2007-04-06 -------------------------- - Changed BZIP2.C, [.VMS]VMS.C, and [.VMS]VMS.H to accomodate older VMS and/or C RTL versions, by adding conditional replacement functions for fchmod(), fchown(), strcasecmp(), and strdup(). - Changed [.VMS]DESCRIP_SRC.MMS to let the user more easily build the BZ_NO_STDIO object library (LIBBZ2_NS.OLB) from modules compiled without the default option, /NAMES = AS_IS. To do this, specify the MMS macro CFLAGS_NAMES_NS defined to null (MMS /MACRO = "CFLAGS_NAMES_NS"). Because of name collisions, only the BZ_NO_STDIO object library may be built without case-sensitvity. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.0.4a 2007-03-22 -------------------------- - General update to version 1.0.4. - Minor changes to VMS builders. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.0.3c 2006-12-29 -------------------------- - Changed the VMS builders to create an additional (variant) object library, LIBBZ2_NS.OLB, using objects built with the C macro BZ_NO_STDIO, which may be needed by some applications. - Builders were ignoring most command-line C macros (spurious use of the MMS macro "CDEFS_UNX" instead of "CDEFS"). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.0.3b 2004-10-07 -------------------------- - Added code to the access callback function to set the "sequential access only" (SQO) flag. This avoids excessive lock time when writing to a file system with highwater marking enabled. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Version 1.0.3a 2004-10-04 -------------------------- - Added on VMS a version suffix ("a") for the main program, BZIP2. - Changed on VMS to use "BZIP2_OPTS" and "BZIP_OPTS" as option "environment variables" (instead of "BZIP2" and "BZIP") to avoid colliding with foreign command symbols. - Changed on VMS to use "-bz2" and "-out" instead of ".bz2" and ".out" on new compressed and uncompressed file names, respectively. - Added "-bz" and "-bz2" to the list of recognized suffixes for compressed file names. Changed suffix recognition on VMS to be case-insensitive and to ignore file versions. - Added VMS wild-card file name expansion on VMS. - Added non-default RMS parameter setting on VMS for better I/O speed. - Command line case is preserved if SET PROCESS /PARSE_STYLE = EXTENDED. - Added MMS/MMK builder files. ------------------------------------------------------------------------ Changes to Source Files ----------------------- Files new for VMS (all in [.VMS]): COLLECT_DEPS.COM Dependency collector for DESCRIP_MKDEPS.MMS. DECC_VER.C Program to show versions: VMS, C compiler, C run-time library. DESCRIP.MMS Main MMK or MMS description ("make") file. DESCRIP_DEPS.MMS Source dependency description file. DESCRIP_MKDEPS.MMS Source dependency generator description file. DESCRIP_SRC.MMS Source list description file. MOD_DEP.COM Dependency modifier for DESCRIP_MKDEPS.MMS. VMS.C Various VMS-specific code: VMS file name manipulation, file name wildcard expansion, open callback function for better RMS parameters. VMS.H VMS-specific header file. VMS_NAME_FIX.SH UNIX shell script to restore original mixed-case and multi-dot file names after storage on an ODS2 file system. VMS_NOTES.TXT These notes. Files modified for VMS: BZIP2.C Various VMS-specific changes: version suffix, use of a file open callback function and other file open changes, a new "#if BZ_VMS" conditional code section, new file name suffixes ("-bz2", "-bz", "-out"), case-insensitive file name comparison. BZIP2RECOVER.C Added a declaration of "verbosity". BZLIB.C Added new functions, BZ2_bzlibVersionBase() and BZ2_bzlibVersionDate() BZLIB.H Added prototypes for new functions in BZLIB.C. BZLIB_PRIVATE.H Changed to "#include " unconditionally. Restructured the BZ_VERSION macro into separate BZ_VERSION_BASE and BZ_VERSION_DATE macros (for use with changes in BZLIB.C). ------------------------------------------------------------------------ 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. For details on the MMS/MMK builder, see the comments in [.VMS]DESCRIP.MMS. The build must be done from the main directory, not the [.VMS] subdirectory. The basic operations look like these (MMS shown, MMK similar): SET DEFAULT [.BZIP2-1_0_4A_VMS] MMS /DESC = [.VMS] CLEAN ! Deletes all object, list, map, ! and executable files for the ! current CPU type (small-file). MMS /DESC = [.VMS] ! Builds the small-file object ! libraries and executables. MMS /DESC = [.VMS] TEST ! Runs the tests (small-file ! executable shown). See IA64 ! note below. MMS /DESC = [.VMS] /MACRO = LARGE=1 CLEAN ! Deletes all object, ! list, map, and ! executable files for ! the current CPU type ! (large-file, non-VAX). MMS /DESC = [.VMS] /MACRO = LARGE=1 ! Builds the large-file ! object libraries and ! executables (non-VAX). MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST ! Runs the tests ! (large-file ! executable, non-VAX). ------------------------------------------------------------------------ Note for VMS IA64 - Possible Data Corruption -------------------------------------------- There appears to be an optimizer problem with the HP C compilers identifying themselves as follows (and perhaps others): HP C S7.1-013 on OpenVMS IA64 V8.2 HP C V7.2-001 on OpenVMS IA64 V8.2-1 The problem appears to be solved in: HP C V7.2-022 on OpenVMS IA64 V8.3 This problem causes the tests to fail ("bzip2/libbzip2: internal error number 3005. [...]"). Because this problem will cause data corruption, it's important to run the tests before trusting this program and/or its object libraries. A work-around which appears to be effective is to compile HUFFMAN.C with /OPTIMIZE = LEVEL = 1. One way to do this is shown below. MMS /DESC = [.VMS] /MACRO = LARGE=1 ! Large-file shown. MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST ! If this fails: DELETE [.IA64L]HUFFMAN*.OBJ;* ! For small-file: [.IA64]. MMS /DESC = [.VMS] /MACRO = ( LARGE=1, - ! Special re-compile and "CCOPTS=/OPTIMIZE=LEVEL=1" ) ! re-link. MMS /DESC = [.VMS] /MACRO = LARGE=1 TEST ! Re-test. ------------------------------------------------------------------------ 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 BZIP2 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 (+1) 651-699-9818 (voice) 382 South Warwick Street sms@antinode.org Saint Paul MN 55105-2547