===================================== Cdrtools Version 3.00 (3.00a) for VMS ===================================== ======================================================================== Functional changes for VMS. 2010-10-01 SMS. -------------------------------------------- This kit includes MMS/MMK product builders which were not included in the official cdrtools 3.00 kit. The official kit also included several obsolete MMS description files and command procedures which would best be ignored. When using the newer builders, all object files, object libraries, executables, and any other system-specific files should be placed into system-specific subdirectories in the source tree, such as [.ALPHA], [.IA64], or [.VAX]. If the large-file option is specifed (non-VAX), [.ALPHAL] or [.IA64L]. (See below for details.) Command-line case is preserved by all programs if SET PROCESS /PARSE_STYLE = EXTENDED is in effect (non-VAX, where C run-time library support exists). This obviates quoting upper/mixed-case options (which is required, as usual, on VAX or with SET PROCESS /PARSE_STYLE = TRADITIONAL). All major programs now have an exit handler to restore process base priority ("nice(0)"). CDRECORD (and CDDA2WAV?) normally raise it (where privileges allow), but did not previously restore it. The priority-raising scheme is now a build-time option, which may be specified in the VMS section of [.include.schily]xmconfig.h. Older cdrtools versions always used "nice(-20)". Now, an OS-specific nice() value may be selected, or an actual VMS process base priority value may be specified. The current default on VMS is to set the priority to 16, the lowest real-time priority value on VMS. CDDA2WAV, CDRECORD, MKISOFS, and READCD now use some VMS-specific parameters on open operations for major files. This typically enables double buffers, read-ahead, write-behind, and larger extend quantities. Users who do not override the RMS defaults (SET RMS_DEFAULT) should see significant I/O speed improvements. Users may override the new default parameters using SET RMS_DEFAULT explicitly to set different ones. Program "--version" reports now include the build-time VMS version in the host description string. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MKISOFS Changes --------------- - New "-E" option to show ISO 9660 header (Environment) information. This shows, for example, ".mkisofsrc" file data not explicitly specified on the command line. The "-v" option now also shows whether ".mkisofsrc" was used. These changes are enabled by defining the C macro "SMS", which is done by the by the VMS builders. (Look for "SMS" in [.mkisofs]descrip_src.mms.) - ODS5 extended file name support (not well tested). - Various bug fixes. (See below for details.) - The new MKISOFS option, "-find", must be enabled at build time. See notes below. MKISOFS "-find" --------------- The relatively new MKISOFS option, "-find", has not been well tested on VMS. It may be enabled at build time, on a non-VAX system, by defining the MMS/MMK macro FIND. See comments in [.vms]descrip.mms. - The "-name" pattern matching code is UNIX-oriented, so it's case sensitive, and there's no default for version numbers. For example, "-name ab.*" will _not_ match "AB.C;1" (case), and "-name *.C" will not match "AB.C;1" (version). A name pattern like "[aA][bB].C;*" would match any version of "ab.C", "aB.C", "Ab.C", or "AB.C". On an ODS2 file system, specifying all-upper-case names is sufficient to deal with this case sensitivity, but more care is needed for ODS5. - The unusual implementation of inodes in the VMS C RTL will probably defeat inode-related features ("-inum", "%i"). Beginning with VMS V8.2 (or so), building with the MMS macro STD_STAT defined may help by switching to a more POSIX-compatible inode implementation, but enabling this feature may change the behavior of the stat() function in all programs in this collection, so it could cause problems anywhere. Also, STD_STAT probably requires large-file support (LARGE), and is not available on VAX. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - MKISOFS Diagnostic Programs --------------------------- There are some diagnostic programs related to ISO-9660 file systems hidden in the [.mkisofs.diag] directory. Executables for the working ones should be created in the same directory as MKISOFS.EXE, and suitable foreign-command symbols may be created for them, if desired. (See Foreign-Command Symbols, below.) The working ones are: - isodebug print mkisofs debug info from ISO-9660 image. - isoinfo perform directory like listings of iso9660 images. - isovfy verify the integrity of an iso9660 image. Not yet working (due to UNIX screen handling, at least) is a more interactive program: - isodump display the contents of iso9660 images. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VMS CD/DVD Device Specification ------------------------------- In this version, a CD/DVD drive may be specified using a normal VMS device name (physical or logical). For example, "dev=dkb500" or "dev=cdrw" (where "cdrw" is a logical name which has been defined to identify an appropriate device). As in previous cdrecord/cdrtools versions, the old standard cdrecord/cdrtools "bus,target,lun" format is also allowed (with some changes to the mapping from previous versions). That is, "dev=bus,tgt,lun" (where "bus", "tgt", and "lun" are integers), rather than a simple VMS device name. The "dev=bus,tgt,lun" specification is translated into a VMS device name as shown below. bus: 0 1 2 3 4 5 6 7 dka dkb dkc dkd gka gkb gkc gkd (SCSI disk, SCSI generic) 8 9 10 11 12 13 14 15 dqa dqb dqc dqd dqe dqf dqg dqh (ATAPI) 16 17 18 19 20 21 22 23 dna dnb dnc dnd dne dnf dng dnh (USB) tgt: SCSI ID (always zero for ATAPI devices) lun: SCSI LUN (normally 0 for SCSI, zero or one for ATAPI) For example, "dev=1,5,0" specifies DKB500, and "dev=8,0,0" specifies DQA0. If a SCSI adapter beyond "D" is needed, the simplest method would be to specify the actual VMS device name instead of using the "bus,tgt,lun" scheme. However, to use the "bus,tgt,lun" scheme in such a case, one could specify some nonexistent GK device (like "dev=7,1,1"), and then define a logical name to redirect the phony device name (here, GKD101) back to the real device. For example, if the CD/DVD drive were DKF300: $ define GKD101 DKF300 $ cdrecord dev=7,1,1 -prcap - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GKDRIVER -------- Some VAX systems (with older hardware and/or older VMS versions) will need to use (or work better if they use) the GKDRIVER generic SCSI driver for the CD/DVD drive, instead of the usual DKDRIVER SCSI disk driver. The indicating symptom might be an I/O failure like this: cdda2wav: invalid argument. Cannot send SCSI cmd via ioctl %SYSTEM-?-BADPARAM, bad parameter value or many (recoverable) errors like this: cdda2wav: not owner. ReadCD MMC 12: scsi sendcmd: retryable error One way to select an alternate device driver involves editing SYS$MANAGER:SYCONFIG.COM to control which driver is used for the CD/DVD device. The suggested changes shown below do three things: 1. Prevent all the system devices from being automatically configured (because that would connect the CD/DVD device using the default DKDRIVER), 2. Arrange to specify GKDRIVER for the CD/DVD device(s), and then 3. Automatically configure all the other devices. The first change is to uncomment this line in SYCONFIG.COM: $! STARTUP$AUTOCONFIGURE_ALL == 0 This prevents SYS$STARTUP:VMS$DEVICE_STARTUP.COM from configuring any devices. Then (also in SYCONFIG.COM), add the appropriate SYSGEN commands to do the configuration as desired. (Refer to VMS$DEVICE_STARTUP.COM to ensure that all the desirable things which it would normally do are moved into SYCONFIG.COM.) In this example, the CD/DVD drive is on the "A" SCSI adapter at SCSI ID 5 (normally DKA500): $ mcr sysgen ! Do the normal tasks from SYS$STARTUP:VMS$DEVICE_STARTUP.COM. connect fta0 /noadapter /drivername = ftdriver connect mpa0 /noadapter /drivername = pipedriver ! Connect the CD-R/RW drive using the generic SCSI driver. connect gka500 /noadapter ! Auto-configure everything (else). autoconfigure all exit - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Foreign-Command Symbols ----------------------- As in previous cdrecord/cdrtools versions, it's usual to define foreign-command symbols for the programs. It may be helpful to gather the various program executables from their individual directories, and put them all into some more convenient directory. CDDA2WAV :== $ dev:[dir]CDDA2WAV.EXE CDRECORD :== $ dev:[dir]CDRECORD.EXE ISODEBUG :== $ dev:[dir]ISODEBUG.EXE ISOINFO :== $ dev:[dir]ISOINFO.EXE ISOVFY :== $ dev:[dir]ISOVFY.EXE MKISOFS :== $ dev:[dir]MKISOFS.EXE READCD :== $ dev:[dir]READCD.EXE Symbol definitions like these could be added to the system-wide SYS$MANAGER:SYLOGIN.COM procedure, to a user's SYS$LOGIN:LOGIN.COM procedure, to or to some other convenient procedure, as appropriate. Alternatively, the DCL$PATH logical name can be defined to include the directory (or directories) where these programs are located. ======================================================================== Build procedure for VMS. 2010-09-29 SMS. ----------------------------------------- Local Customization ------------------- Some program features may be enabled or disabled in a local configuration file, [.vms]descrip_local.mms. (A template file is preserved as [.vms]descrip_local.mms_template.) Comments in the file explain the options (briefly), and how to enable or disable them. Currently, this file affects only some features in the audio extraction program, cdda2wav. This file should be edited as desired before building the products. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Building the Products --------------------- MMS/MMK product builders are distributed throughout the source tree, and in the [.vms] directory: [.vms]collect_deps.com [.vms]vax_old.opt [...]descrip*.mms Any older *.com procedures which may still be found in the source tree are obsolete, and should not be used. In the simplest case, build the products so: SET DEFAULT [.vms] MMS ! Or MMK. See below for more options. Old versions of MMK or MMS may need to have additional macros defined on the command line, but helpful messages should explain what to do when. (Old MMS versions on VAX may need MMS$ARCH_NAME. Old MMK versions may need MMSDESCRIPTION_FILE.) Details of the build options are explained in [.vms]descrip.mms. Some popular targets and options include: MMS CLEAN MMS CLEAN_ALL MMS CLEAN_EXE MMS CLEAN_OLB MMS /MACRO = (LIST=1) MMS /MACRO = (LARGE=1) ! Non-VAX. Important for DVD support, ! where files bigger than 2GB are likely. Inside the major subdirectories, "MMS /DESCRIP = [-.vms] [...]" should work. To (re-)generate the source dependency ("[...]DESCRIP_DEPS.MMS") files, MMS (V3.5 or newer?) is needed: MMS /EXTENDED /DESCRIPTION = descrip_mkdeps.mms /SKIP To save time during program development, when these are changing often, it helps to save the intermediate .MMSD files (output from CC /MMS_DEPENDENCIES), so: MMS /EXTENDED /DESCRIPTION = descrip_mkdeps.mms /MACRO = NOSKIP=1 For details, see the comments in [.vms]descrip_mkdeps.mms. Linking on old VMS VAX versions may generate warnings: %LINK-W-MULPSC, conflicting attributes for psect LIB$INITIALIZE in module LIB$INITIALIZE file SYS$COMMON:[SYSLIB]STARLET.OLB; A LINK options file ([.vms]vax_old.opt) is supplied which should help. Try adding '/MACRO = ("LINKOPTS=[-.vms]vax_old.opt/OPTIONS")' to the MMS/MMK command. The cdrtools programs use C run-time library features which were not available before VMS V7.0. Building on VMS versions earlier than V7.0 is possible using the "backport library" features provided by DEC C V5.6 and later compilers. The details are described in the file SYS$LIBRARY:DECC$CRTL.README, which is supplied with these compilers. This file also describes the options available to deal with time zones and the newer UTC-based time functions. The builders (specifically, the .FIRST actions in [.vms]descrip_src_cmn.mms) check the VMS version, and, if it is pre-V7, define the logical names DECC$CRTLMAP (as SYS$LIBRARY:DECC$CRTL.EXE) and LNK$LIBRARY (as SYS$LIBRARY:DECC$CRTL.OLB), unless the user has already defined them. This should persuade the compiler to use a suitably high value for __CRTL_VER when compiling, and a suitably complete C RTL when linking. Environments with non-default configurations may require changes from the code supplied, but it should be possible to confine any needed changes to this one region. In case of problems with the builders or the products, it's often helpful to include various software version data (VMS, C compiler, C RTL) in any problem report. The source kit includes a short program to make this easier. A normal build should create the executable: [.libvms.]DECC_VER.EXE When reporting any problems, please run this program, and include its output in the problem report. If problems with the build cause a failure before this executable is built, a more limited build in the [.libvms] directory may have a better chance: set default [.libvms] mms /descrip = [-.vms] [... any other options ...] ======================================================================== Source changes for VMS. 2010-10-05 SMS. ---------------------------------------- [.cdda2wav]cdda2wav.c Changed to use the NICE and NICE_PRIO macros (defined in [.include.schily]xmconfig.h), in code currently disabled. [.cdda2wav]interface.c Changed to skip the bus scan on VMS. [.cdda2wav]vms.c (NEW) Set up initialization (non-VAX) to set DECC$* variables. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.cdrecord]cdrecord.c INSERT_YOUR_EMAIL_ADDRESS_HERE Changed to skip the bus scan on VMS. Changed to use the NICE and NICE_PRIO macros (defined in [.include.schily]xmconfig.h on VMS, and in [.include.schily]xconfig.h elsewhere). Minor spelling corrections. [.cdrecord]vms.c (NEW) Set up exit handler to restore base process priority. Set up initialization (non-VAX) to set DECC$* variables. [.cdrecord]xio.c Added VMS-specific open() parameters for access callback function. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.include.schily]align.h Changed to "#include ", even if SCHILY_BUILD is not defined. [.include.schily]avoffset.h Changed to "#include ", even if SCHILY_BUILD is not defined. [.include.schily]jmpdefs.h Changed to avoid conflicts with system header files. [.include.schily]schily.h Added "#ifndef _OPENFD_SRC" conditionality around "#define _openfd _openfd64" in the "#if defined(HAVE_LARGEFILES)" section. Adjusted some questionable "const" keywords in declarations. [.include.schily]stat.h Added macros to accommodate old-style VMS inode data structures. [.include.schily]time.h Added "struct timeval" declaration for VMS systems which lack it. [.include.schily]vfork.h Added "#include " to get its declaration of decc$set_child_standard_streams() (to clear a "%CC-I-IMPLICITFUNC" complaint). [.include.schily]xconfig.h Removed some explicit "will go away soon" VMS dependence, as the builders now define the USE_STATIC_CONF macro. Defined VMS-specific NICE and NICE_PRIO macros for better control of process priority boosting, and added default definitions for non-VMS systems. [.include.schily]xmconfig.h Added details for large-file support (where available). Generally reconciled HAVE_xxx abd SIZEOF_xxx macros with reality. Added macros to substitute libschily *printf() functions for the corresponding VMS C RTL functions. Defined macros _OPENFD_SRC and _openfd to switch to a VMS-specific replacement for _openfd(). Defined a VMS-specific O_BINARY flag value for internal use. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.libfind]fetchdir.c Added code for old-style VMS inode data structures. [.libfind]find.c Added code for old-style VMS inode data structures. [.libfind]find_list.c Added code for old-style VMS inode data structures. [.libfind]walk.c Added a VMS-specific declaration of "statfun". Added code for old-style VMS inode data structures. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.libscg]scsi-vms.c Corrected some cases where errno or a returned status value was not set properly. Changed to use the device-specific "gk_chan" variable (in the "scg_local" structure), instead of the (now removed) global "gk_chan" variable. Added support for simple VMS device names (instead of requiring "bus,target,lun" notation). Added an explicit check for privileges DIAGNOSE and PHY_IO. Added a check to avoid molesting mounted disk devices. Added an IA64-specific work-around for a system crash (MACHINECHK) on IA64. (EHH.) [.libscg]scsierrs.c Added type casts to clear PTRMISMATCH compiler complaints. [.libscg]scsihelp.c Changed a message to say "VMS" instead of "UNIX" on VMS. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.libschily]saveargs.c Changed to simplify the full VMS path for argv[ 0] to just the program name. [.libschily]spawn.c Adjusted some questionable "const" keywords in declarations. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.libschily.stdio]filewrite.c Changed "fwrite(buf, 1, len, f)" to "fwrite(buf, len, 1, f)" to get one record of length "len", instead of "len" records of length one, which repairs the appearance of much text output (error messages, and so on) when program output is directed to a file with variable-length record format (as with SET HOST /LOG, for example). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.libvms]vms_init.c Minor spelling correction. [.libvms]vms_misc.c Added some (non-documented) caret-escaped characters to the list. [.libvms]vms_misc.h Removed redundant/defective definition of HAVE_STRCASECMP. Repaired a misleading comment. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.mkisofs]mkisofs.c Added VMS-specific fopen() parameters for access callback function. Added "-E" option for ISO 9660 header (environment) display. ("#ifdef SMS", enabled by the VMS builders.) Changed to notify user of use or non-use of init file with "-E" or "-v". ("#ifdef SMS", enabled by the VMS builders.) Added "-w" option to keep VMS file version numbers in Rock Ridge names. Changed not to use "/" as a separator when forming the ".mkisofsrc" init file path in VMS. Changed to use "/" for CD paths instead of PATH_SEPARATOR, which is different (']') for VMS. Changed to tolerate blank lines in the init file. Changed to use "NLA0:" instead of "/dev/null" on VMS. Added code for old-style VMS inode data structures. Moved the declaration of data_change_warn out of conditionality on USE_FIND, clearing a build failure if FIND support was not enabled. Changed usage() on VMS to use one I/O record per output line, which repairs the appearance of "-help" output when program output is directed to a file with variable-length record format (as with SET HOST /LOG, for example). Minor spelling corrections, and some message format changes. [.mkisofs]mkisofs.h Added a prototype for the new function, write_one_file_progress(). Added code for old-style VMS inode data structures. Added a variable for the "-w" option (keep_vms_version). [.mkisofs]multi.c Removed unnecessary VMS-specific #include directives. [.mkisofs]name.c Changed to use a header file definition of the ".DIR;1" string, and to make a case-insensitive comparison with it to accommodate ODS5 extended file names. [.mkisofs]tree.c Adjusted VMS-specific #include directives. Changed to skip "." and ".." files/directories. Changed the file-format test to allow UDF and FIX as well as STMLF, and changed the "unsupported VMS record format" message to show the name of the unsupported format. Added one more use of "vms_path_fixup()", needed with new C RTL. Added some code to remove caret escape characters from ODS5 extended file names. (Not well tested.) Added code for the "-w" option. Minor spelling corrections in comments. [.mkisofs]vms.c Removed code for functions now in the C RTL or no longer used: closedir. getopt, opendir, readdir, [VMS_]stat, strdup. Set up initialization (non-VAX) to set DECC$* variables. Changed vms_path_fixup() and RMS I/O functions to cope with ODS5 extended file names. Changed vms_write_one_file() to use the same progress messages as write_one_file(). Added functions for VMS-UNIX name conversion. [.mkisofs]vms.h Removed code for functions now in the C RTL or no longer used. Added macro kit for NAML structure for ODS5 extended file names. Added function prototypes for path_unix_vms(), vms_dir_fixup(), vms_path_fixdown()vms_path_fixup() and vms_write_one_file(). [.mkisofs]write.c Separated progress message code into a new function, write_one_file_progress(), now used by both vms_write_one_file() and write_one_file(). Changed a relational operator to clear a QUESTCOMPARE compiler complaint. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.mkisofs.diag]dump.c [.mkisofs.diag]dump.mk [.mkisofs.diag]isodebug.c [.mkisofs.diag]isodebug.mk [.mkisofs.diag]isodump.c [.mkisofs.diag]isodump.mk [.mkisofs.diag]isoinfo.c [.mkisofs.diag]isoinfo.mk [.mkisofs.diag]isovfy.c [.mkisofs.diag]isovfy.mk Removed explicit directories from "#include" directives in the ".c" files (which caused trouble for the VMS builders). Changed the ".mk" files accommodate these changes on non-VMS systems. In isoinfo.c, added code for old-style VMS inode data structures. [.mkisofs.diag]vms_diag.c (NEW) Set up initialization (non-VAX) to set DECC$* variables. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.readcd]readcd.c Changed to skip the bus scan on VMS. [.readcd]vms.c (NEW) Set up initialization (non-VAX) to set DECC$* variables. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.scgcheck]scgcheck.c Changed to skip the bus scan on VMS. Minor spelling corrections. [.scgcheck]vms.c (NEW) Set up initialization (non-VAX) to set DECC$* variables. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [.vms]collect_deps.com Fixed a case-dependence problem. [.vms]descrip.mms Replaced obsolete file. [.vms]descrip_local.mms Comment updated. [.vms]descrip_local.mms_template Comment updated. [.vms]descrip_mkdeps.mms Replaced obsolete file. [.vms]descrip_src.mms Comment updated. [.vms]descrip_src_cmn.mms Replaced obsolete file. [.vms]descrip_src_flags.mms Comment updated. [.vms]lconfig.h_vms (NEW) VMS-specific lconfig.h for cdda2wav. Based on [.cdda2wav]lconfig.h.in. [.vms]vms_notes.txt General update. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Obsolete builder files in the original kit. ------------------------------------------- []build_all.com [.cdda2wav]build_cdda2wav.com [.cdrecord]build_all.com [.cdrecord]build_cdrecord.com [.libfile]libfile.com [.libhfs_iso]libhfs_iso.com [.libscg]libscg.com [.libschily]libschily.com [.mkisofs]build_mkisofs.com [.readcd]build_readcd.com [.vms]append_version.com [.vms]discard_link_files.com [.vms]restore_file_links.sh [.vms]vms_name_fix.sh ========================================================================